/[Frey]/trunk/lib/Frey/MapReduce.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/MapReduce.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 972 - (show annotations)
Fri Jan 9 19:33:26 2009 UTC (15 years, 3 months ago) by dpavlin
File size: 765 byte(s)
draw class includes and refactor parts of code
1 package Frey::MapReduce;
2 use Moose;
3
4 extends 'Frey';
5 with 'Frey::Web';
6 with 'Frey::Storage';
7 with 'Frey::File';
8
9 use YAML qw/LoadFile/;
10
11 has path => (
12 is => 'rw',
13 isa => 'Str',
14 required => 1,
15 default => 'var/introspect/',
16 );
17
18 sub as_markup {
19 my ($self) = @_;
20
21 my $introspect;
22
23 my @files = map {
24 my $path = $_;
25 my $data = LoadFile( $path );
26 $data = [ keys %{ $data->{ 'runnable' } } ];
27
28 my $class = $path;
29 $class =~ s{^(.*/)?([^/]+)\.ya?ml$}{$2};
30 $introspect->{ $class } = $data;
31 $_;
32 } $self->dir_extension( $self->path, qr{\.(ya?ml)$} );
33
34 warn "# introspect ", $self->dump( $introspect );
35
36 $self->store('var/Frey/Class/Browser/runnable.yaml', $introspect );
37
38 return $self->dump({
39 files => \@files,
40 introspect => $introspect,
41 });
42 }
43
44 1;

  ViewVC Help
Powered by ViewVC 1.1.26