/[Frey]/trunk/lib/Frey.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/lib/Frey.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 99 by dpavlin, Tue Jul 8 12:18:33 2008 UTC revision 100 by dpavlin, Fri Jul 11 19:19:42 2008 UTC
# Line 20  crops; the brother of Freya. Line 20  crops; the brother of Freya.
20    
21  =cut  =cut
22    
 use Data::Dump qw/dump/;  
 use File::Find;  
   
 has 'classes' => (  
         is => 'ro',  
 #       isa => 'HashRef[Str]',  
         default => sub {  
                 my $self = shift;  
                 # FIXME there must be better way to do this in Moose style  
                 my $classes;  
                 finddepth({ no_chdir => 1, wanted => sub {  
                         return unless s/\.pm$//;  
                         my @a = split(m!/!,$_);  
                         warn ">> $_ ",dump( @a ) if $self->debug;  
                         my $package = join('::', @a[ 1 .. $#a ]);  
                         warn "## $package\n";  
                         push @$classes, { $package => "$_.pm" };  
                 } }, 'lib');  
                 warn "## classes = ",dump( $classes ) if $self->debug;  
                 $classes;  
         },  
         lazy => 1,  
 );  
   
23  1;  1;

Legend:
Removed from v.99  
changed lines
  Added in v.100

  ViewVC Help
Powered by ViewVC 1.1.26