/[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

Contents of /trunk/lib/Frey.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 56 - (show annotations)
Sun Jul 6 11:59:58 2008 UTC (15 years, 8 months ago) by dpavlin
File size: 946 byte(s)
more work on server-size class browser

- correct loading of modules
- display required attributes
1 package Frey;
2 use Moose;
3
4 has 'debug' => (
5 is => 'rw',
6 isa => 'Bool',
7 default => 0,
8 );
9
10 =head1 NAME
11
12 Frey - hi-level web framework in spirit of 4GLs
13
14 =head1 DESCRIPTION
15
16 n. Mythology.
17
18 The Norse god who dispenses peace, good weather, prosperity, and bountiful
19 crops; the brother of Freya.
20
21 =cut
22
23 use Data::Dump qw/dump/;
24 use File::Find;
25
26 has 'classes' => (
27 is => 'ro',
28 # isa => 'HashRef[Str]',
29 default => sub {
30 my $self = shift;
31 # FIXME there must be better way to do this in Moose style
32 my $classes;
33 finddepth({ no_chdir => 1, wanted => sub {
34 return unless s/\.pm$//;
35 my @a = split(m!/!,$_);
36 if ( $#a != 2 ) {
37 warn "SKIP $_ [$#a]" if $self->debug;
38 return;
39 }
40 warn ">> $_ ",dump( @a ) if $self->debug;
41 my $package = "$a[1]::$a[2]";
42 warn "## $package\n";
43 push @$classes, { $package => "$_.pm" };
44 } }, 'lib');
45 warn "## classes = ",dump( $classes ) if $self->debug;
46 $classes;
47 },
48 lazy => 1,
49 );
50
51 1;

  ViewVC Help
Powered by ViewVC 1.1.26