From: Chris W. <la...@us...> - 2004-11-30 01:55:14
|
Update of /cvsroot/openinteract/OpenInteract2/doc/Manual In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32736/Manual Modified Files: Packages.pod Log Message: inline package examples and add some more information Index: Packages.pod =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/doc/Manual/Packages.pod,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Packages.pod 17 Feb 2004 04:30:11 -0000 1.7 --- Packages.pod 30 Nov 2004 01:55:02 -0000 1.8 *************** *** 86,94 **** basic package skeleton for you. Here's an example: ! [% INCLUDE examples/pkg_manage_create_cmd | indent 2 %] which creates the following directories and files: ! ! [% INCLUDE examples/pkg_file_listing | indent 2 %] For what files you'll most likely edit, check out the --- 86,116 ---- basic package skeleton for you. Here's an example: ! $ oi2_manage create_package \ ! --package=mypackage \ ! --source_dir=/path/to/OI2-source which creates the following directories and files: ! ! mypackage # Main directory ! mypackage/package.conf # Basic package configuration (name, ...) ! mypackage/MANIFEST # List of files in package ! mypackage/MANIFEST.SKIP # Regexes to skip when creating MANIFEST ! mypackage/conf # Configuration directory ! mypackage/conf/spops.ini # Persistent object(s) configuration ! mypackage/conf/action.ini # Action(s) configuration ! mypackage/data # Package data/security directory ! mypackage/doc # Documentation directory ! mypackage/doc/mypackage.pod # Starter documentation ! mypackage/struct # Package table definition directory ! mypackage/template # Template directory ! mypackage/template/sample.tmpl # Sample Template Toolkit template ! mypackage/script # Tools program directory ! mypackage/html # Static html directory ! mypackage/html/images # Image directory ! mypackage/OpenInteract2 # Object hierarchy directory ! mypackage/OpenInteract2/Action # Action implementation directory ! mypackage/OpenInteract2/Action/Mypackage.pm # Sample action with 'hello' and 'list' tasks ! mypackage/OpenInteract2/SQLInstall # Structure/data installation directory ! mypackage/OpenInteract2/SQLInstall/Mypackage.pm # Sample structure/data installation For what files you'll most likely edit, check out the *************** *** 106,110 **** L<OpenInteract2::Package|OpenInteract2::Package> documentation: ! [% INCLUDE examples/pkg_read_info | linenum %] For each website OpenInteract2 maintains a file with the installed --- 128,143 ---- L<OpenInteract2::Package|OpenInteract2::Package> documentation: ! # Read information about a package distribution ! ! my $package = OpenInteract2::Package->new({ ! package_file => '/home/cwinters/pkg/mynewpackage-1.02.zip' ! }); ! my $config = $package->config; ! print "Package ", $package->name, " ", $package->version, "\n", ! "Author ", join( ", ", @{ $config->author } ), "\n"; ! my $files = $package->get_files; ! foreach my $filename ( @{ $files } ) { ! print " File - $filename\n"; ! } For each website OpenInteract2 maintains a file with the installed *************** *** 118,126 **** C<oi2_manage> tool: ! [% INCLUDE examples/pkg_manage_list_cmd | indent 2 %] Which will give you output like this: ! [% INCLUDE examples/pkg_manage_list_output | indent 2 %] =head1 HOW OI2 USES PACKAGES --- 151,175 ---- C<oi2_manage> tool: ! $ oi2_manage list_packages --website_dir=$WEBSITE_DIR Which will give you output like this: ! PROGRESS: Starting task ! PROGRESS: Task complete ! ACTION: ! OK: Package base-2.02 in site ! OK: Package base_box-2.01 in site ! OK: Package base_error-2.02 in site ! OK: Package base_group-2.01 in site ! OK: Package base_page-2.04 in site ! OK: Package base_security-2.01 in site ! OK: Package base_template-3.00 in site ! OK: Package base_theme-2.01 in site ! OK: Package base_user-2.03 in site ! OK: Package full_text-2.01 in site ! OK: Package news-2.01 in site ! OK: Package lookup-2.00 in site ! OK: Package object_activity-2.02 in site ! OK: Package system_doc-2.00 in site =head1 HOW OI2 USES PACKAGES *************** *** 128,133 **** =head2 At Startup ! At server startup the OI2 server performs the following actions ! regarding packages: =over 4 --- 177,182 ---- =head2 At Startup ! At server startup the each package provides the OI2 server with the ! following data: =over 4 *************** *** 135,146 **** =item * ! It collects all modules from each package and places them in a ! consolidated library directory. This ensures we don't have an C<@INC> ! with so many entries. =item * ! It asks each module for its C<action.ini> file, scrubs the data (in ! L<OpenInteract2::Action|OpenInteract2::Action>), creates action objects from the file's information and asks each one for the URLs it will respond to. This becomes the URL-to-action mapping. --- 184,197 ---- =item * ! B<All Perl modules>. The server will place them in a consolidated ! library directory. This ensures we don't have an C<@INC> with so many ! entries. This directory is called 'tmplib' in any logging messages you ! might see. =item * ! B<Action configuration>. The package tells the server its ! C<action.ini> file. The server reads it in, scrubs and modifies the ! data (in L<OpenInteract2::Config::Initializer>), creates action objects from the file's information and asks each one for the URLs it will respond to. This becomes the URL-to-action mapping. *************** *** 148,158 **** =item * ! It asks each module for its C<spops.ini> files. It consolidates all ! SPOPS information, does some scrubbing of the data (in ! L<OpenInteract2::SPOPS|OpenInteract2::SPOPS>) and then whips the ! classes into existence using L<SPOPS::Initialize|SPOPS::Initialize>. =back The L<OpenInteract2::Context|OpenInteract2::Context> object also instantiates a L<OpenInteract2::Repository|OpenInteract2::Repository> --- 199,226 ---- =item * ! B<SPOPS configuration>. The package lets the server know about its ! C<spops.ini> files. The server reads them in, consolidates all SPOPS ! information, does some scrubbing of the data (in ! L<OpenInteract2::Config::Initializer>) and then whips the classes into ! existence using L<SPOPS::Initialize|SPOPS::Initialize>. ! ! =item * ! ! B<TT2 plugins>. The package lets the server know about any declared ! Template Toolkit plugins. These will be instiantiated at startup and ! made available in the TT environment just like the C<OI> plugin ! is. (See L<OpenInteract::TT2::Plugin> for more on it.) ! ! =item * ! ! B<Observers>. Any observer classes specified in the package ! configuration will be instantiated and registered for use. (See ! L<OpenInteract2::Observer> for more.) =back + See L<OpenInteract2::Config::Package> for more information about how + these data are provided. + The L<OpenInteract2::Context|OpenInteract2::Context> object also instantiates a L<OpenInteract2::Repository|OpenInteract2::Repository> |