1 |
dpavlin |
24 |
package Frey; |
2 |
|
|
use Moose; |
3 |
dpavlin |
17 |
|
4 |
dpavlin |
657 |
our $VERSION = "0.23"; |
5 |
dpavlin |
121 |
|
6 |
dpavlin |
575 |
use Data::Dump qw//; |
7 |
dpavlin |
692 |
sub dump { ref(shift) . ' ' . Data::Dump::dump ( @_ ) } |
8 |
dpavlin |
575 |
|
9 |
dpavlin |
24 |
has 'debug' => ( |
10 |
|
|
is => 'rw', |
11 |
dpavlin |
532 |
isa => 'Int', |
12 |
dpavlin |
56 |
default => 0, |
13 |
dpavlin |
24 |
); |
14 |
dpavlin |
17 |
|
15 |
|
|
=head1 NAME |
16 |
|
|
|
17 |
|
|
Frey - hi-level web framework in spirit of 4GLs |
18 |
|
|
|
19 |
|
|
=head1 DESCRIPTION |
20 |
|
|
|
21 |
|
|
n. Mythology. |
22 |
|
|
|
23 |
|
|
The Norse god who dispenses peace, good weather, prosperity, and bountiful |
24 |
|
|
crops; the brother of Freya. |
25 |
|
|
|
26 |
dpavlin |
180 |
Basically you write L<Moose> classes which become deirectly callable from |
27 |
dpavlin |
697 |
the Firefox using REST API. |
28 |
dpavlin |
180 |
|
29 |
dpavlin |
209 |
=head1 INTROSPECTION |
30 |
|
|
|
31 |
|
|
Secondary goal is to have introspection. |
32 |
|
|
|
33 |
dpavlin |
293 |
=head2 Moose classes |
34 |
|
|
|
35 |
|
|
All Moose classes have simple introspection API which use |
36 |
|
|
L<Frey::Introspect> to show class and it's pod (using L<Frey::Pod>). |
37 |
|
|
|
38 |
|
|
Example of valid REST URL is |
39 |
|
|
|
40 |
|
|
http://localhost:16001/Frey |
41 |
|
|
|
42 |
|
|
which will show L<Frey> class introspection. |
43 |
|
|
|
44 |
|
|
You can also add method invocation and optonal parametars to C<new> |
45 |
|
|
constructor like this: |
46 |
|
|
|
47 |
dpavlin |
455 |
http://localhost:16001/Frey::Pod/as_markup?class=Frey |
48 |
dpavlin |
293 |
|
49 |
|
|
this is same using L<Frey::Pod> from perl as |
50 |
|
|
|
51 |
dpavlin |
455 |
Frey::Pod->new( class => 'Frey' )->as_markup; |
52 |
dpavlin |
293 |
|
53 |
|
|
if you leave out parametars, L<Frey::Run> will ask for required ones. |
54 |
|
|
|
55 |
dpavlin |
209 |
=head2 Database |
56 |
|
|
|
57 |
|
|
For database objects we support L<Fey> and when your objects are created |
58 |
|
|
C<< with 'Frey::Collection' >> they will have basic CRUD functionality |
59 |
|
|
implemented by L<Frey::ObjectBrowser>. |
60 |
|
|
|
61 |
dpavlin |
697 |
=head1 SEE ALSO |
62 |
|
|
|
63 |
|
|
L<Frey::Manual> |
64 |
|
|
|
65 |
dpavlin |
17 |
=cut |
66 |
|
|
|
67 |
|
|
1; |