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

Annotation of /trunk/lib/Frey.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 468 - (hide annotations)
Wed Nov 19 19:59:52 2008 UTC (15 years, 4 months ago) by dpavlin
File size: 1479 byte(s)
collect warn output by traping $SIG{__WARN__}
and show it in status line with editor_links
1 dpavlin 24 package Frey;
2     use Moose;
3 dpavlin 17
4 dpavlin 463 our $VERSION = "0.21";
5 dpavlin 121
6 dpavlin 24 has 'debug' => (
7     is => 'rw',
8 dpavlin 50 isa => 'Bool',
9 dpavlin 56 default => 0,
10 dpavlin 24 );
11 dpavlin 17
12     =head1 NAME
13    
14     Frey - hi-level web framework in spirit of 4GLs
15    
16     =head1 DESCRIPTION
17    
18     n. Mythology.
19    
20     The Norse god who dispenses peace, good weather, prosperity, and bountiful
21     crops; the brother of Freya.
22    
23 dpavlin 180 Basically you write L<Moose> classes which become deirectly callable from
24     the web using REST API
25    
26 dpavlin 209 =head1 INTROSPECTION
27    
28     Secondary goal is to have introspection.
29    
30 dpavlin 293 =head2 Moose classes
31    
32     All Moose classes have simple introspection API which use
33     L<Frey::Introspect> to show class and it's pod (using L<Frey::Pod>).
34    
35     Example of valid REST URL is
36    
37     http://localhost:16001/Frey
38    
39     which will show L<Frey> class introspection.
40    
41     You can also add method invocation and optonal parametars to C<new>
42     constructor like this:
43    
44 dpavlin 455 http://localhost:16001/Frey::Pod/as_markup?class=Frey
45 dpavlin 293
46     this is same using L<Frey::Pod> from perl as
47    
48 dpavlin 455 Frey::Pod->new( class => 'Frey' )->as_markup;
49 dpavlin 293
50     if you leave out parametars, L<Frey::Run> will ask for required ones.
51    
52 dpavlin 209 =head2 Database
53    
54     For database objects we support L<Fey> and when your objects are created
55     C<< with 'Frey::Collection' >> they will have basic CRUD functionality
56     implemented by L<Frey::ObjectBrowser>.
57    
58 dpavlin 17 =cut
59    
60 dpavlin 468 use Data::Dump qw/dump/;
61    
62     our @warnings;
63     $SIG{__WARN__} = sub {
64     # emit original warning
65     warn(@_);
66    
67     push @warnings, $_ foreach @_;
68     };
69    
70     sub warnings {
71     #print STDERR "### warnings ",dump( @warnings );
72     @warnings;
73     }
74    
75 dpavlin 17 1;

  ViewVC Help
Powered by ViewVC 1.1.26