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 > Perl Modules

    Text::NeatTemplate 0.08

    Download button

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

    License / Price:

    Last Updated:

    Category:
    Kathryn Andersen | More programs
    Perl Artistic License / FREE
    September 26th, 2007, 12:05 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    Text::NeatTemplate description

    A fast, middleweight template engine.

    Text::NeatTemplate is a fast, middleweight template engine.

    SYNOPSIS

    use Text::NeatTemplate;

    my $tobj = Text::NeatTemplate->new();

    $result = $tobj->fill_in(data_hash=>�ta,
    show_names=>%names,
    template=>$text);


    This module provides a simple, middleweight but fast template engine, for when you need speed rather than complex features, yet need more features than simple variable substitution.

    Markup Format

    The markup format is as follows:

    {$varname}

    A variable; will display the value of the variable, or nothing if that value is empty.

    {$varname:format}

    A formatted variable; will apply the formatting directive(s) to the value before displaying it.

    {?varname stuff [$varname] more stuff}

    A conditional. If the value of 'varname' is not empty, this will display "stuff value-of-variable more stuff"; otherwise it displays nothing.

    {?var1 stuff [$var1] thing [$var2]}

    This would use both the values of var1 and var2 if var1 is not empty.

    {?varname stuff [$varname] more stuff!!other stuff}

    A conditional with "else". If the value of 'varname' is not empty, this will display "stuff value-of-variable more stuff"; otherwise it displays "other stuff".

    This version can likewise use multiple variables in its display parts.

    {?var1 stuff [$var1] thing [$var2]!![$var3]}

    {&funcname(arg1,...,argN)}

    Call a function with the given args; the return value of the function will be what is put in its place.

    {&MyPackage::myfunc(stuff,[$var1])}

    This would call the function myfunc in the package MyPackage, with the arguments "stuff", and the value of var1.

    Note, of course, that if you have a more complicated function and are processing much data, this will slow things down.

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    template engine | neat template | Perl module | template | engine | Perl

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

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