NAME
Template::Flute::Utils - Template::Flute utility functions
FUNCTIONS
derive_filename FILENAME SUFFIX [FULL] [ARGS]
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)
returns
templates/foobar.png
Also, with the pass_absolute
argument a SUFFIX containing an absolute file path will be returned verbatim, e.g.
derive_filename('templates/helloword.html',
'/home/racke/components/login.html',
1,
pass_absolute => 1)
produces
/home/racke/components/login.html
AUTHOR
Stefan Hornburg (Racke), <racke@linuxia.de>
LICENSE AND COPYRIGHT
Copyright 2010-2021 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.