Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.2 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Libraries

    Text::TemplateFill 1.7

    Download button

    No screenshots available
    Downloads: 314  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Alain D D Williams | More programs
    Perl Artistic License / FREE
    August 6th, 2007, 18:05 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    Text::TemplateFill description

    Text::TemplateFill is a Perl module for formatting of reports with templates from files, use for I18N.

    Text::TemplateFill is a Perl module for formatting of reports with templates from files, use for I18N.

    SYNOPSIS

    use Text::TemplateFill;

    my $tmpl = new Text::TemplateFill;
    $tmpl->SetOpt('BaseDir' => "paras/$Country");
    $tmpl->SetOpt('ErrorFunction' => &LogMsg, 'LineTerminator' => "rn");

    # Must read all the files before printing a paragraph
    $tmpl->ReadPara('Header', "head");
    $tmpl->ReadPara('FirstPage');
    $tmpl->ReadPara('Footer');
    $tmpl->ReadPara('Body');
    $tmpl->SetOpt('StartPageTag' => 'Header');

    my ($a, $b, $cn, $d) = ('a', 'letter b', 'ACME Inc', 4.92);
    $tmpl->BindVars('NameOfA' => $a, 'B' => $b, 'CustomerName' => $cn, 'VarD' => $d);

    print $tmpl->GeneratePara('FirstPage'); # Optional - since we want a specific 1st page

    print $tmpl->GeneratePara('Body');
    ... $a = ...; $b = ...
    print $tmpl->GeneratePara('Body');
    print $tmpl->CompletePage;

    Here are some key features of "Text TemplateFill":

    · I18N formatting support, eg: decimal comma in France
    · I18N date support
    · Automatic page breaks
    · Variables are 'registered', not passed to each GeneratePara
    · Items of text (paragraphs) that are output are initially read from a text file.
    · Calculations may be defined as part of the paragraph definition in the file.
    · Optional use of your own Error reporting code
    · Variables can be formatted by the full power of printf
    · Automatic page/paragraph counting
    · Output is a string that may be then written anywhere

    Requirements:

    · Perl



    Product's homepage

      


    TAGS:

    format reports | I18N templates | Perl module | Text::TemplateFill | I18N | template

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM