/[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 50 by dpavlin, Wed Jul 2 22:30:19 2008 UTC revision 121 by dpavlin, Mon Jul 14 21:22:43 2008 UTC
# Line 1  Line 1 
1  package Frey;  package Frey;
2  use Moose;  use Moose;
3    
4    our $VERSION = "0.11";
5    
6  has 'debug' => (  has 'debug' => (
7          is => 'rw',          is => 'rw',
8          isa => 'Bool',          isa => 'Bool',
9          default => 1,          default => 0,
10  );  );
11    
12  =head1 NAME  =head1 NAME
# Line 20  crops; the brother of Freya. Line 22  crops; the brother of Freya.
22    
23  =cut  =cut
24    
 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!/!,$_);  
                         if ( $#a != 2 ) {  
                                 warn "SKIP $_ [$#a]" if $self->debug;  
                                 return;  
                         }  
                         warn ">> $_ ",dump( @a ) if $self->debug;  
                         my $package = "$a[1]::$a[2]";  
                         warn "## $package\n";  
                         push @$classes, $package;  
                 } }, 'lib');  
                 warn "## classes = ",dump( $classes ) if $self->debug;  
                 $classes;  
         },  
         lazy => 1,  
 );  
   
25  1;  1;

Legend:
Removed from v.50  
changed lines
  Added in v.121

  ViewVC Help
Powered by ViewVC 1.1.26