NAME

zofcms_helper - helper script for ZofCMS web-framework/templating system

SYNOPSYS

mkdir site_dir; cd site_dir; zofcms_helper --site example --plugins QueryToTemplate,DBI,SomeOtherPlugin;

DESCRIPTION

zofcms_helper is a helper script supplied with App::ZofCMS. It is used to create "startup" structure for your site as well as adding plugin files, which isn't necessary if you installed them on your server via CPAN.

SUPPORTED ARGUMENTS

--site

zofcms_helper --site example

The --site argument specifies the directory to use for your web accessible directory of ZofCMS, this is where you'll have your index.pl file (the helper script will create it). If you don't specify the --core argument (see below) it will automatically created from the --site argument by appending _site to whatever you specify. If you don't provide --site argument, the default is zcms.

--core

zofcms_helper --site example --core example_core

The --core argument specifies the name of directory for the "data" directory of ZofCMS, in other words, this is web-inaccessible directory in which you will have your config file, "data_storage" and "templates" directory (see App::ZofCMS::Config for description) as well as any of ZofCMS plugins. The helper script creates config file, all of those directories as well as directory Execs (see App::ZofCMS::Template) and Extras (see App::ZofCMS::Extras). The helper script also creates basic base.tmpl, index.tmpl and 404.tmpl in data/ directory inside the directory specified by --core as well as basic index.tmpl inside templates/ directory. If --core parameter is not specified it will be created by appending _site to whatever you've gave to --site argument.

Note: currently there is no support [in the helper script] to have --core point to a directory on a different level than --site. If you desperatelly need this please let me know and I will add that support. For now, you can simply edit the created index.pl file, in particular it's two lines:

use lib '../core_dir';

....

my $conf = $config->load( '../core_dir/config.txt' );

--plugins

zofcms_helper --site zcms --plugins DBI,QueryToTemplate,OtherPlugin

This options takes a comma (,) separated list of plugin names to copy over into your "core" directory. This is useful if your server does not support module installation from CPAN; i.e. the helper script copies the modules installed on your system into "core" directory from where ZofCMS can load them, thus when you are done with your site you can simply upload --site and --core directories to your server and everything should work just fine.

NOTE: do not include the App::ZofCMS::Plugin:: part of the name of the modules, the above command installs App::ZofCMS::Plugin::DBI, App::ZofCMS::Plugin::QueryToTemplate and App::ZofCMS::Plugin::OtherPlugin modules into the "core" directory.

Note: the command presented above will recreate the "core" files and index.pl file. To avoid that, i.e. just add the plugins, use the <--nocore> option

--cpan

zofcms_helper --site zcms --cpan Data::Tranformer,Foo::Bar::Baz

This option has the same purpose as the --plugins except this one copies your installed CPAN modules to $core_dir/CPAN/

For example, Data::Transformer module is required by App::ZofCMS::Tagged plugin, using the --cpan command you can copy it over into ZofCMS "core directory" and upload your application to the server that does not have Data::Transformer installed. Note: this option is not that smart, it's not going to copy anything but the actual .pm file for the module you've specified.

--nocore

zofcms_helper --nocore --site zcms --plugins DBI,QueryToTemplate

The --nocore option tells the helper script not to create any "core" directories or files, the command above will only install DBI and QueryToTemplate plugins into the "core" directory.

AUTHOR

Zoffix Znet, <zoffix at cpan.org> (http://zoffix.com, http://haslayout.net)

BUGS

Please report any bugs or feature requests to bug-app-zofcms at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=App-ZofCMS. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc App::ZofCMS

You can also look for information at:

COPYRIGHT & LICENSE

Copyright 2008 Zoffix Znet, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.