The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Carrot::Productivity::Text::Placeholder::Miniplate::OS::Unix::File::Name - access name parts of a file

SYNOPSIS

        $class_names->provide(
                my $template_class = '::Productivity::Text::Placeholder::Template');

        my $template = $template_class->constructor(
                my $os_unix_file = '::OS::Unix::File::Name');
        $template->compile('File base name: [=file_name_only=]');

        $os_unix_file->set_subject('/tmp/test.dat');
        print ${$template->execute()}, "<-\n";

DESCRIPTION

Provides the placeholders file_name_(full|path|only|extension). The file doesn't needs to exists.

METHOD REFERENCE (API)

subject($file_name)

Sets or gets the file name.

add_placeholder($template, $code_ref)

Adds the $code_ref under the name of $template. $code_ref is executed and returns the current value to be substituted for $template.

KNOWN BUGS AND LIMITATIONS

This is the first public release.

AUTHOR

Winfried Trumper <pub+perl(a)wt.tuxomania.net>

COPYRIGHT AND LICENSE

Copyright (C) 2011 Winfried Trumper

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.