NAME
Text::Amuse::Compile - Compiler for Text::Amuse
VERSION
Version 0.01
SYNOPSIS
use Text::Amuse::Compile;
my $compiler = Text::Amuse::Compile->new;
$compiler->compile($file1, $file2, $file3)
METHODS/ACCESSORS
CONSTRUCTOR
new(ttdir => '.', pdf => 1, ...);
Constructor. It will accept the following options
Format options (by default all of them are activated);
- tex
-
LaTeX output
-
Plain PDF without any imposition
- a4_pdf
-
PDF imposed on A4 paper
- lt_pdf
-
PDF imposed on Letter paper
- html
-
Full HTML output
- epub
-
The EPUB
- bare_html
-
The bare HTML, non <head>
Template directory:
- ttdir
-
The directory where to look for templates, named as format.tt
You can retrieve the value by calling them on the object.
METHODS
templates
The Text::Amuse::Compile::Templates object, which will provide the templates string references.
version
Report version information
compile($file1, $file2, ...);
Main method to get the job done, passing the list of muse files. You can inspect the errors calling errors
. It does produce some output.
report_failure($message1, $message2, ...)
This method is called when the compilation of a file raises an exception, so it's for internal usage.
It passes the arguments along to report_failure_sub
as a list if you set that to a sub, otherwise it prints to the standard error.
report_failure_sub(sub { my @problems = @_ ; print @problems });
You can set the sub to be used to report problems using this accessor, which is supposed to receive the list of messages.
errors
Accessor to the catched errors. It returns a list of strings.
add_errors($error1, $error2,...)
Add an error. [Internal]
reset_errors
Reset the errors
AUTHOR
Marco Pessotto, <melmothx at gmail.com>
BUGS
Please mail the author and provide a minimal example to add to the test suite.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Text::Amuse::Compile
LICENSE
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.