Template::Flute::Utils - Template::Flute utility functions
Derives a filename with a different SUFFIX from FILENAME, e.g.
derive_filename('templates/helloworld.html', '.xml')
returns
templates/helloworld.xml
With the FULL parameter set it can be used to produce a path for a relative filename from another filename with a directory, e.g.
derive_filename('templates/helloworld.html', 'foobar.png', 1)
templates/foobar.png
Also, with the pass_absolute argument a SUFFIX containing an absolute file path will be returned verbatim, e.g.
pass_absolute
derive_filename('templates/helloword.html', '/home/racke/components/login.html', 1, pass_absolute => 1)
produces
/home/racke/components/login.html
Stefan Hornburg (Racke), <racke@linuxia.de>
Copyright 2010-2013 Stefan Hornburg (Racke) <racke@linuxia.de>.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
To install Template::Flute, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Template::Flute
CPAN shell
perl -MCPAN -e shell install Template::Flute
For more information on module installation, please visit the detailed CPAN module installation guide.