/[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 31 by dpavlin, Sun Jun 29 20:49:42 2008 UTC revision 968 by dpavlin, Fri Jan 9 14:52:58 2009 UTC
# Line 1  Line 1 
1  package Frey;  package Frey;
2  use Moose;  use Moose;
3    
4    our $VERSION = "0.26";
5    
6    use Data::Dump qw//;
7    sub dump {
8            my $self = shift;
9            Data::Dump::dump( @_ );
10    }
11    
12  has 'debug' => (  has 'debug' => (
13          is => 'rw',          is => 'rw',
14          isa => 'Int',          isa => 'Int',
15          default => 1,          default => 0,
16  );  );
17    
18  =head1 NAME  =head1 NAME
19    
20  Frey - hi-level web framework in spirit of 4GLs  Frey - hi-level web framework in spirit of 4GLs based on Moose
21    
22  =head1 DESCRIPTION  =head1 DESCRIPTION
23    
24  n. Mythology.    n. Mythology.
   
 The Norse god who dispenses peace, good weather, prosperity, and bountiful  
 crops; the brother of Freya.  
25    
26  =cut    The Norse god who dispenses peace, good weather, prosperity, and bountiful
27      crops; the brother of Freya.
28    
29  use Data::Dump qw/dump/;  Basically you write L<Moose> classes which become directly callable from
30  use File::Find;  the Firefox using REST API. for gentle intoduction see L<Frey::Manual>.
31    
32  has 'classes' => (  =cut
         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,  
 );  
33    
34  1;  1;

Legend:
Removed from v.31  
changed lines
  Added in v.968

  ViewVC Help
Powered by ViewVC 1.1.26