1 |
package Frey; |
package Frey; |
2 |
use Moose; |
use Moose; |
3 |
|
|
4 |
our $VERSION = "0.21"; |
our $VERSION = "0.24"; |
5 |
|
|
6 |
|
use Data::Dump qw//; |
7 |
|
sub dump { |
8 |
|
my ($self,$data) = @_; |
9 |
|
Data::Dump::dump( $data ); |
10 |
|
} |
11 |
|
|
12 |
has 'debug' => ( |
has 'debug' => ( |
13 |
is => 'rw', |
is => 'rw', |
14 |
isa => 'Bool', |
isa => 'Int', |
15 |
default => 0, |
default => 0, |
16 |
); |
); |
17 |
|
|
21 |
|
|
22 |
=head1 DESCRIPTION |
=head1 DESCRIPTION |
23 |
|
|
24 |
n. Mythology. |
n. Mythology. |
25 |
|
|
26 |
The Norse god who dispenses peace, good weather, prosperity, and bountiful |
The Norse god who dispenses peace, good weather, prosperity, and bountiful |
27 |
crops; the brother of Freya. |
crops; the brother of Freya. |
28 |
|
|
29 |
Basically you write L<Moose> classes which become deirectly callable from |
Basically you write L<Moose> classes which become deirectly callable from |
30 |
the web using REST API |
the Firefox using REST API. for gentle intoduction see L<Frey::Manual>. |
31 |
|
|
32 |
=head1 INTROSPECTION |
This is just brief overview of concepts so you might check if they suite you |
33 |
|
before you get into details. |
34 |
|
|
35 |
Secondary goal is to have introspection. |
=head1 Developer parts |
36 |
|
|
37 |
=head2 Moose classes |
=head2 Moose classes |
38 |
|
|
54 |
|
|
55 |
Frey::Pod->new( class => 'Frey' )->as_markup; |
Frey::Pod->new( class => 'Frey' )->as_markup; |
56 |
|
|
57 |
if you leave out parametars, L<Frey::Run> will ask for required ones. |
Forms to enter required parameters will be generated automatically, |
58 |
|
allowing you to explore your data while you are making interface for it. |
59 |
|
|
60 |
=head2 Database |
=head2 Database |
61 |
|
|
62 |
|
FIXME broken if not noted in C<TODO> |
63 |
|
|
64 |
For database objects we support L<Fey> and when your objects are created |
For database objects we support L<Fey> and when your objects are created |
65 |
C<< with 'Frey::Collection' >> they will have basic CRUD functionality |
C<< with 'Frey::Collection' >> they will have basic CRUD functionality |
66 |
implemented by L<Frey::ObjectBrowser>. |
implemented by L<Frey::ObjectBrowser>. |
67 |
|
|
68 |
=cut |
=head1 User parts |
69 |
|
|
70 |
use Data::Dump qw/dump/; |
=head2 Pipes |
71 |
|
|
72 |
our @warnings; |
See L<Frey::Pipe> for now. |
73 |
$SIG{__WARN__} = sub { |
|
74 |
# emit original warning |
=head1 SEE ALSO |
75 |
warn(@_); |
|
76 |
|
L<Frey::Manual> |
77 |
push @warnings, $_ foreach @_; |
|
78 |
}; |
=cut |
|
|
|
|
sub warnings { |
|
|
#print STDERR "### warnings ",dump( @warnings ); |
|
|
@warnings; |
|
|
} |
|
79 |
|
|
80 |
1; |
1; |