Rechercher une page de manuel
Jifty::Bootstrap.3pm
Langue: en
Version: 2007-12-26 (ubuntu - 08/07/09)
Section: 3 (Bibliothèques de fonctions)
NAME
Jifty::Bootstrap - Insert initial data into your databaseDESCRIPTION
"Jifty::Bootstrap" is an abstract base class for your application's bootstrapping. Use it to set up initial data in your database when your application is first installed.EXAMPLE
package MyApp::Bootstrap; use base 'Jifty::Bootstrap'; sub run { my $user = MyApp::CurrentUser->new( _bootstrap => 1); my $modelclass = MyApp::Model::Thingy->new(current_user => $user); $modelclass->create( name => 'Widget'); };
run
"run" is the workhorse method for the Bootstrap class. This takes care of setting up internal data structures and initializing things in an application-dependent manner.SEE ALSO
Jifty::Upgrade, Jifty::Script::SchemaLICENSE
Jifty is Copyright 2005-2006 Best Practical Solutions, LLC. Jifty is distributed under the same terms as Perl itself.Contenus ©2006-2024 Benjamin Poulain
Design ©2006-2024 Maxime Vantorre