1use warnings; 2use strict; 3 4package Jifty::Bootstrap; 5 6use base qw/Jifty::Object/; 7 8=head1 NAME 9 10Jifty::Bootstrap - Insert initial data into your database 11 12=head1 DESCRIPTION 13 14C<Jifty::Bootstrap> is an abstract base class for your application's 15bootstrapping. Use it to set up initial data in your database when 16your application is first installed. 17 18=head1 EXAMPLE 19 20 package MyApp::Bootstrap; 21 use base 'Jifty::Bootstrap'; 22 23 sub run { 24 my $user = MyApp::CurrentUser->new( _bootstrap => 1); 25 my $modelclass = MyApp::Model::Thingy->new(current_user => $user); 26 $modelclass->create( name => 'Widget'); 27 }; 28 29=head2 run 30 31C<run> is the workhorse method for the Bootstrap class. This takes care of 32setting up internal data structures and initializing things in an 33application-dependent manner. 34 35=cut 36 37sub run { 38 1; 39} 40 41=head1 SEE ALSO 42 43L<Jifty::Upgrade>, L<Jifty::Script::Schema> 44 45=head1 LICENSE 46 47Jifty is Copyright 2005-2010 Best Practical Solutions, LLC. 48Jifty is distributed under the same terms as Perl itself. 49 50=cut 51 521; 53