Name
App::Munchies - Catalyst example application using food recipes as a data set
Version
0.6.$Revision: 1298 $
Synopsis
# Start the development server with
bin/munchies_server -d -r -rd 1 -rr "\\.xml\$|\\.pm\$" \
--restart_directory lib
# Start the production server with
plackup -s Starman --access-log var/logs/starman_server.log \
bin/munchies_psgi
Description
This is an example application for the CatalystX::Usul base class
Some web applications require common controllers and data models. For example; welcome mat, authentication, password changing, navigation tools and site map are some of the controllers implemented here. Since these modules are not an end in themselves, most of the visible text is stored in XML configuration files and can be customised using the controllers and data models provided. The string "Munchies" for example is a generic application name and it is meant to be replaced with a more specific application name once it has been written
Pages are rendered using a single TT template. The template, CSS, Javascript and collection of GIFs, PNG, etc are stored together and form a "skin" for which a switching mechanism is provided. This enables development of the web application to proceed independently of the interface development. Content (provided by Perl on Catalyst) has been separated from layout (TT+CSS), presentation (CSS) and behaviour (JS). If the interface is not to your liking, write your own skin. These ideas and techniques have been aquired from http://www.csszengarden.com/ and http://www.cssplay.co.uk/
Don't even think about using anything other than a modern version of Chrome / Firefox / Opera to display these pages
Dependencies
Either Apache/mod_perl or Plack/Starman is required to serve HTTP (the other Catalyst engines are also supported). Requires either PostgreSQL or MySQL to be installed. The XML parser requires libxml2
and libxml2-dev
otherwise a slow pure Perl implementation will be used. Installing Perl module dependencies from CPAN will require make
, gcc
and g++
(or equivalents) to be installed. GD::SecurityImage (used to generate Captchas) depends on libgd2-noxpm
and libgd2-noxpm-dev
. It also requires the StayPuft.ttf
font to be installed
Installation
Run these commands as root to install this application from a distribution tarball:
tar -xvzf App-Munchies-?.?.?.tar.gz
cd App-Munchies-?.?.?
./install.sh
It defaults to installing all files (including the var data) under /opt/app-munchies (which is easy to remove if this is not a permanent installation)
Once the schema has been deployed and populated the following (optional) commands will be run:
bin/munchies_cli -nc pod2html
bin/munchies_schema -nc catalog_mmf
as the munchies user. They may take some time to finish. When complete the var area of the application is about 60Mb in size
This distribution contains a setuid root program. It is used to provide limited access to root only functions, e.g. authentication against /etc/shadow. The build process asks if this should be enabled. It is not enabled by default
N.B. Remove user_root from var/secure/support.sub if it exists
N.B. Change the password for the admin account in the R00-Internal realm
Configuration and Environment
Application configuration is in the file lib/App/Munchies/app_munchies.xml
Diagnostics
The -d
option on the bin/munchies_server.pl command line starts the development server server in debug mode
Subroutines/Methods
None
Incompatibilities
Cygwin - Has a wierd gecos field in the passwd file that is a problem for the identity model.
The Pod::ProjectDocs module will not install without forcing. CatalystX::Usul::ProjectDocs monkey patches Pod::ProjectDocs with a different syntax highlighter so that the post install commands can generate the HTML version the application documentation
Bugs and Limitations
There are no known bugs in this module. Please report problems to the address below. Patches are welcome
Author
Peter Flanigan, <Support at RoxSoft.co.uk>
Acknowledgements
Larry Wall - For the Perl programming language
License and Copyright
Copyright (c) 2012 Peter Flanigan. All rights reserved
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic
This program is distributed in the hope that it will be useful, but WITHOUT WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE