1 package MojoFacets::Code;
6 use base 'Mojolicious::Controller';
8 use Data::Dump qw(dump);
14 my $dir = $self->app->home->rel_dir('public') . '/code';
18 foreach my $full_path ( glob("$dir/*.pl") ) {
19 my $path = $full_path;
20 $path =~ s/^$dir\/*//;
21 my ( $column, $description ) = split(/\./,$path,2);
22 $snippets->{$column}->{$description} = read_file $full_path;
26 snippets => $snippets,