--- trunk/lib/Frey.pm 2008/06/29 20:49:42 31 +++ trunk/lib/Frey.pm 2008/12/04 23:09:52 723 @@ -1,10 +1,18 @@ package Frey; use Moose; +our $VERSION = "0.23"; + +use Data::Dump qw//; +sub dump { + my ($self,$data) = @_; + Data::Dump::dump( $data ); +} + has 'debug' => ( is => 'rw', isa => 'Int', - default => 1, + default => 0, ); =head1 NAME @@ -13,39 +21,60 @@ =head1 DESCRIPTION -n. Mythology. + n. Mythology. -The Norse god who dispenses peace, good weather, prosperity, and bountiful -crops; the brother of Freya. + The Norse god who dispenses peace, good weather, prosperity, and bountiful + crops; the brother of Freya. -=cut +Basically you write L classes which become deirectly callable from +the Firefox using REST API. for gentle intoduction see L. -use Data::Dump qw/dump/; -use File::Find; +This is just brief overview of concepts so you might check if they suite you +before you get into details. -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, -); +=head1 Developer parts + +=head2 Moose classes + +All Moose classes have simple introspection API which use +L to show class and it's pod (using L). + +Example of valid REST URL is + + http://localhost:16001/Frey + +which will show L class introspection. + +You can also add method invocation and optonal parametars to C +constructor like this: + + http://localhost:16001/Frey::Pod/as_markup?class=Frey + +this is same using L from perl as + + Frey::Pod->new( class => 'Frey' )->as_markup; + +Forms to enter required parameters will be generated automatically, +allowing you to explore your data while you are making interface for it. + +=head2 Database + +FIXME broken if not noted in C + +For database objects we support L and when your objects are created +C<< with 'Frey::Collection' >> they will have basic CRUD functionality +implemented by L. + +=head1 User parts + +=head2 Pipes + +See L for now. + +=head1 SEE ALSO + +L + +=cut 1;