NAME

App::TypecastTemplates - Format records with different templates.

VERSION

Version v0.3.0

SYNOPSIS

This module allows to print records from a table using different templates. The template to be used for a record is chosen by the value of the column named "type" for that record. The table is expected to be CSV formatted.

The module can be used without any script using the following command line:

perl -M App::TypecastTemplates -e tt_run

It expects the table in CSV format at STDIN and prints the formatted records to STDOUT.

EXPORT

This module exports the function run, that does the formatting.

SUBROUTINES/METHODS

set_columns

Set the column names for a CSV file that doesn't provide them in the first line.

tt_file

Read a file that defines the templates.

tt_run

Run the application as in

perl -MApp::TypecastTemplates -e tt_run

read_templates

AUTHOR

Mathias Weidner, <mamawe at cpan.org>

BUGS

Please report any bugs or feature requests to bug-app-typecasttemplates at rt.cpan.org, or through the web interface at https://rt.cpan.org/NoAuth/ReportBug.html?Queue=App-TypecastTemplates. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc App::TypecastTemplates

You can also look for information at:

ACKNOWLEDGEMENTS

LICENSE AND COPYRIGHT

This software is Copyright (c) 2021 by Mathias Weidner.

This is free software, licensed under:

The Artistic License 2.0 (GPL Compatible)