App-ZofCMS
view release on metacpan or search on metacpan
bin/zofcms_helper view on Meta::CPAN
zofcms_helper --site example --plugins QueryToTemplate,DBI,SomeOtherPlugin;
=head1 DESCRIPTION
C<zofcms_helper> is a helper script supplied with L<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.
=head1 SUPPORTED ARGUMENTS
=head2 C<--site>
zofcms_helper --site example
The C<--site> argument specifies the directory to use for your web
accessible directory of ZofCMS, this is where you'll have your C<index.pl>
file (the helper script will create it). If you don't specify the
C<--core> argument (see below) it will automatically created from the
C<--site> argument by appending C<_site> to whatever you specify. If you
don't provide C<--site> argument, the default is C<zcms>.
=head2 C<--core>
zofcms_helper --site example --core example_core
The C<--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 L<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 C<Execs> (see L<App::ZofCMS::Template>)
and C<Extras> (see L<App::ZofCMS::Extras>). The helper script also creates
basic C<base.tmpl>, C<index.tmpl> and C<404.tmpl> in C<data/> directory
inside the directory specified by C<--core> as well as basic
C<index.tmpl> inside C<templates/> directory. If C<--core> parameter is not
specified it will be created by appending C<_site> to whatever you've
gave to C<--site> argument.
B<Note:> currently there is no support [in the helper script]
to have C<--core> point to a directory on a different level than C<--site>.
If you desperatelly need this please let me know and I will add that
support. For now, you can simply edit the created C<index.pl> file, in
particular it's two lines:
use lib '../core_dir';
....
my $conf = $config->load( '../core_dir/config.txt' );
=head2 C<--plugins>
zofcms_helper --site zcms --plugins DBI,QueryToTemplate,OtherPlugin
This options takes a comma (C<,>) 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 C<--site> and C<--core> directories to your server and
everything should work just fine.
B<NOTE:> do not include the C<App::ZofCMS::Plugin::> part of the name
of the modules, the above command installs L<App::ZofCMS::Plugin::DBI>,
L<App::ZofCMS::Plugin::QueryToTemplate> and
C<App::ZofCMS::Plugin::OtherPlugin> modules into the "core" directory.
B<Note:> the command presented above will recreate the "core" files and
C<index.pl> file. To avoid that, i.e. just add the plugins, use the
<--nocore> option
=head2 C<--overwrite_existing_plugins>
zofcms_helper --site zcms --plugins DBI,QueryToTemplate,OtherPlugin --overwrite_existing_plugins
The C<--plugins> option above will NOT overwrite any existing files by default. To force overwriting,
use the C<--overwrite_existing_plugins> option.
=head2 C<--cpan>
zofcms_helper --site zcms --cpan Data::Tranformer,Foo::Bar::Baz
This option has the same purpose as the C<--plugins> except this one
copies your installed CPAN modules to $core_dir/CPAN/
For example, Data::Transformer module is required by L<App::ZofCMS::Tagged>
plugin, using the C<--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. B<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.
=head2 C<--nocore>
zofcms_helper --nocore --site zcms --plugins DBI,QueryToTemplate
The C<--nocore> option tells the helper script not to create any "core"
directories or files, the command above will only install C<DBI> and
C<QueryToTemplate> plugins into the "core" directory.
=head2 C<--pages>
zofcms_helper --nocore --site zcms --pages foo,foo/bar,foo/bar/baz
The C<--pages> argument tells C<zofcms_helper> to create "page templates". The value to
C<--pages> argument is a comma separated list of pages you wish to create. With this argument
the script will try to be smart and create an empty file in C<data> directory as well as
a ZofCMS Template file in C<templates> directory. Just run the script with the example above
and check out your data and templates dirs to see the result.
=head2 C<--show_plugins>
zofcms_helper --nocore --site zcms --show_plugins
Takes no arguments, when present, zofcms_helper will show a list of all the plugins
used by the site (note that plugins listed in Main Config File under C<dir_defaults> key
are currently not shown by this function).
=head1 REPOSITORY
Fork this module on GitHub:
L<https://github.com/zoffixznet/App-ZofCMS>
=head1 BUGS
To report bugs or request features, please use
L<https://github.com/zoffixznet/App-ZofCMS/issues>
If you can't access GitHub, you can email your request
to C<bug-App-ZofCMS at rt.cpan.org>
=head1 AUTHOR
Zoffix Znet <zoffix at cpan.org>
(L<http://zoffix.com/>, L<http://haslayout.net/>)
=head1 LICENSE
You can use and distribute this module under the same terms as Perl itself.
See the C<LICENSE> file included in this distribution for complete
details.
=cut
( run in 0.921 second using v1.01-cache-2.11-cpan-b16cb0d3907 )