Peter Flanigan

Name

Catalyst::Plugin::InflateMore - Inflates symbols in application config

Synopsis

   package YourApp;

   use Catalyst qw(InflateMore ConfigLoader ...);

   # In your applications config file
   <appldir>__APPLDIR__</appldir>
   <binsdir>__BINSDIR__</binsdir>
   <libsdir>__LIBSDIR__</libsdir>
   <ctrldir>__appldir(var/etc)__</ctrldir>
   <dbasedir>__appldir(var/db)__</dbasedir>
   <logfile>__appldir(var/logs/server.log)__</logfile>
   <logsdir>__appldir(var/logs)__</logsdir>
   <root>__appldir(var/root)__</root>
   <rprtdir>__appldir(var/root/reports)__</rprtdir>
   <rundir>__appldir(var/run)__</rundir>
   <skindir>__appldir(var/root/skins)__</skindir>
   <tempdir>__appldir(var/tmp)__</tempdir>
   <vardir>__appldir(var)__</vardir>

Version

This documents version v0.7.$Rev: 1 $ of Catalyst::Plugin::InflateMore

Description

If symbols like __MYSYMBOL__, __BINSDIR__, or __binsdir()__ are present in the application config they will be inflated to the appropriate directory paths if the corresponding lower case method name is defined in the inflation class

Configuration and Environment

The Plugin::InflateMore attribute in the application config hash contains the name of the class whose methods will do the actual inflating

Symbols should always use the forward slash as a path separator regardless of OS type, i.e. __appldir(var/logs)__

Subroutines/Methods

setup

Create an instance of the class that will do the inflating

finalize_config

Override Catalyst::Plugin::ConfigLoader method. Will inflate any symbols matching the patterns __SYMBOL__ and __symbol( value )__

_inflate_symbols

Call the appropriate method to get the base path and append any arguments. Returns a Path::Class object representing the arguments passed

Diagnostics

None

Dependencies

Catalyst::Utils
Data::Visitor::Callback
Path::Class

Incompatibilities

There are no known incompatibilities in this module

Bugs and Limitations

There are no known bugs in this module. Please report problems to http://rt.cpan.org/NoAuth/Bugs.html?Dist=Catalyst-Plugin-InflateMore. Patches are welcome

Acknowledgements

Larry Wall - For the Perl programming language

Author

Peter Flanigan, <pjfl@cpan.org>

License and Copyright

Copyright (c) 2013 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