The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Egg - WEB application framework.

SYNOPSIS

First of all, please make the project.

And, please setup as you answer the WEB request.

Please see Egg::Release for details.

A local script and the operation such as cron can be united as follows.

 #!/usr/loca/bin/perl -w
 use strict;
 use [MYPROJECT];
 
 my $e= [MYPROJECT]->new;

 $e->method ...
 
 ... ban, bo, bo, bo, bon.

However, I think that the error occurs only because some methods are for WEB requests.

ENVIRONMENT

It explains the environment variable more in detail in Egg::Release.

[MYPROJECT]_DISPATCHER

[MYPROJECT]_CUSTOM_DISPATCHER

[MYPROJECT]_UNLOAD_DISPATCHER

[MYPROJECT]_MODEL

[MYPROJECT]_VIEW

[MYPROJECT]_REQUEST

METHODS

new

It is called from the controller of the project directly. Only the Request object is accepted to the argument. It is undefined and good usually.

 my $e= [MYPROJECT]->new;

$e->namespace

The project name under operation is returned. It is the same as ref($e).

$e->config

The HASH reference of the configuration is returned.

$e->plugins

The list of the loaded plugin is returned by the ARRAY reference.

$e->flags

The set flag is settled by the HASH reference and it returns it.

$e->flag([FLAG NAME]);

The value of the specified flag is returned.

$e->encode;

The object for the character-code processing is returned.

$e->euc_conv, $e->sjis_conv, $e->utf8_conv

$e->dispatch or $e->d

When the argument is not given, the dispath object made from 'create_dispatch' is returned. When the argument is given, the class name modified with '[MYPROJECT]::D' is returned.

 # [MYPROJECT]::D::Hoge->foo is called.
 
 $e->d('Hoge')->foo($e);

$e->request or $e->req

The Egg::Request object is returned.

$e->response or $e->res

The Egg::Response object is returned.

$e->model([MODEL_NAME]);

The object of specified MODEL is returned.

$e->view

The VIEW object to output contents is returned.

$e->debug;

It is a flag whether operate by debug mode.

$e->template; $e->error;

It is an accessor to $e->stash.

$e->snip->[[Number]];

The ARRAY reference into which the request passing is divided by/is returned.

$e->stash->{[KEY NAME]};

It is a preservation place to share data.

$e->stash([KEY], [VALUE]);

When [KEY] is given, the value of $e->stash->{[KEY]} is returned.

When [VALUE] is given, the value is set in $e->stash->{[KEY]}.

$e->finished([RESPONSE STATUS CODE]);

It reports on the completion of processing. Please give an appropriate response code.

BUGS

When you find a bug, please email me (<mizuno@bomcity.com>) with a light heart.

SEE ALSO

Egg::Release, Egg::Engine, Egg::Model, Egg::View, Egg::Request, Egg::Response, Egg::D::Stand, Egg::Debug::Base,

AUTHOR

Masatoshi Mizuno, <mizuno@bomcity.com>

COPYRIGHT AND LICENSE

Copyright (C) 2006 Bee Flag, Corp. <http://egg.bomcity.com/>, All Rights Reserved.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.