Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

poet(3pm) [debian man page]

Poet(3pm)						User Contributed Perl Documentation						 Poet(3pm)

NAME
Poet -- a modern Perl web framework for Mason developers SYNOPSIS
% poet new MyApp my_app/.poet_root my_app/bin/app.psgi ... % my_app/bin/run.pl Running plackup --Reload ... --env development --port 5000 Watching ... for file updates. HTTP::Server::PSGI: Accepting connections at http://0:5000/ DESCRIPTION
Poet is a modern Perl web framework designed especially for Mason developers. It uses PSGI/Plack for server integration, Mason for request routing and templating, and a selection of best-of-breed CPAN modules for caching, logging and configuration. FEATURES
o A common-sense directory hierarchy for web development o A configuration system that scales elegantly with multiple coders and multiple layers (development/production) o Integration with Log4perl for logging, wrapped with dead-simple configuration o Integration with CHI for powerful and flexible caching o The power of Mason, an object-oriented templating system, for request routing and content generation o Easy access to common objects and utilities from anywhere in your application o Conventions and defaults based on the author's best practices from over fifteen years of Perl web development; and o The freedom to override just about any of Poet's behaviors DOCUMENTATION
All documentation is indexed at Poet::Manual. SUPPORT
For now Poet will share a mailing list and IRC with Mason. The Mason mailing list is "mason-users@lists.sourceforge.net"; you must be subscribed <https://lists.sourceforge.net/lists/listinfo/mason-users> to send a message. The Mason IRC channel is #mason <irc://irc.perl.org/#mason>. Bugs and feature requests will be tracked at RT: http://rt.cpan.org/NoAuth/Bugs.html?Dist=Poet bug-poet@rt.cpan.org The latest source code can be browsed and fetched at: http://github.com/jonswar/perl-poet git clone git://github.com/jonswar/perl-poet.git ACKNOWLEDGEMENTS
Poet was originally designed and developed for the Digital Media group of the Hearst Corporation, a diversified media company based in New York City. Many thanks to Hearst for agreeing to this open source release. However, Hearst has no direct involvement with this open source release and bears no responsibility for its support or maintenance. SEE ALSO
Mason, Plack, PSGI AUTHOR
Jonathan Swartz <swartz@pobox.com> COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Jonathan Swartz. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. perl v5.14.2 2012-06-05 Poet(3pm)

Check Out this Related Man Page

Poet::Manual::Subclassing(3pm)				User Contributed Perl Documentation			    Poet::Manual::Subclassing(3pm)

NAME
Poet::Manual::Subclassing - Customizing Poet with subclasses DESCRIPTION
You can subclass the following Poet classes for your application: Poet::Cache Poet::Conf Poet::Log Poet::Mason Poet::Import and arrange things so that Poet always uses your subclass instead of its default class. Place Poet subclasses under "lib/MyApp/Class.pm" in your environment, where "MyApp" is your app name and "Class" is the class you are subclassing minus the "Poet" prefix. A few of these subclasses are generated for you by "poet new". For example, to subclass "Poet::Cache": package MyApp::Cache; use Poet::Moose; extends 'Poet::Cache'; # put your modifications here 1; (Note: Poet::Moose is Moose plus a few Poet standards. You could also use plain "Moose" here.) Poet will automatically detect, load and use any such subclasses. Internally it uses the app_class environment method whenever it needs a classname, e.g. # Do something with MyApp::Cache or Poet::Cache $poet->app_class('Cache')->... Subclassing Mason As long as you have even a bare-bones "Poet::Mason" subclass, e.g. package MyApp::Mason; use Poet::Moose; extends 'Poet::Mason'; 1; then your Mason subclasses will be autodetected as well, e.g. package MyApp::Mason::Interp; use Moose; extends 'Mason::Interp'; # put your modifications here 1; "poet new" will create the bare-bones subclass for you; it is otherwise harmless. See Mason::Manual::Subclasses for more information. EXAMPLES
Use INI instead of YAML for config files package MyApp::Conf; use Config::INI; use Moose; extends 'Poet::Conf'; override 'read_conf_file' => sub { my ($self, $file) = @_; return Config::INI::Reader->read_file($file); }; Perform tasks before and after each Mason request package MyApp::Mason::Request; use Moose; extends 'Mason::Request'; override 'run' => sub { my $self = shift; # Perform tasks before request my $result = super(); # Perform tasks after request return $result; }; Add Perl code to the top of every compiled component package MyApp::Mason::Compilation; use Moose; extends 'Mason::Compilation'; override 'output_class_header' => sub { return join(" ", super(), 'use Foo;', 'use Bar qw(baz);'); }; Use Log::Dispatch instead of Log4perl for logging package MyApp::Log; use Log::Any::Adapter; use Log::Dispatch; use Moose; extends 'Poet::Log'; override 'initialize_logging' => sub { my $log = Log::Dispatch->new( ... ); Log::Any::Adapter->set('Dispatch', dispatcher => $log); }; Add your own $dbh quick var package MyApp::Import use DBI; use Poet::Moose; extends 'Poet::Import'; method provide_dbh ($caller, $poet) { $dbh = DBI->connect(...); } SEE ALSO
Poet AUTHOR
Jonathan Swartz <swartz@pobox.com> COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Jonathan Swartz. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. perl v5.14.2 2012-06-05 Poet::Manual::Subclassing(3pm)
Man Page