Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.6 / 3....
  • Linux Kernel 3.0.82 LTS...
  • KDE Software Compilatio...
  • PulseAudio 4.0
  • Wireshark 1.10.0
  • NetworkManager 0.9.8.2
  • LibreOffice 3.6.6 / 4.0...
  • SystemRescueCd 3.7.0
  • Linux Kernel 3.10 RC6
  • Ubuntu Tweak 0.8.5
  • Home > Linux > Programming > Libraries

    Template::Recall 0.15

    Download button

    No screenshots available
    Downloads: 338  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    Good (3.0/5)
    10 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    James Robson | More programs
    Perl Artistic License / FREE
    April 25th, 2008, 00:24 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    Template::Recall description

    Template::Recall is a "Reverse callback" templating system.

    Template::Recall is a "Reverse callback" templating system.

    SYNOPSIS

    use Template::Recall;

    my $tr = Template::Recall->new( template_path => '/path/to/template/sections' );

    my @prods = (
    'soda,sugary goodness,$.99',
    'energy drink,jittery goodness,$1.99',
    'green tea,wholesome goodness,$1.59'
    );

    $tr->render('header');

    # Load template into memory

    $tr->preload('prodrow');

    for (@prods)
    {
    my %h;
    my @a = split(/,/, $_);

    $h{'product'} = $a[0];
    $h{'description'} = $a[1];
    $h{'price'} = $a[2];

    print $tr->render('prodrow', %h);
    }

    # Remove template from memory

    $tr->unload('prodrows');

    print $tr->render('footer');

    Template::Recall works using what I call a "reverse callback" approach. A "callback" templating system (i.e. Mason, Apache::ASP) generally includes template markup and code in the same file. The template "calls" out to the code where needed. Template::Recall works in reverse. Rather than inserting code inside the template, the template remains separate, but broken into sections. The sections are called from within the code at the appropriate times.

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    Reverse callback | templating system | Perl module | Template::Recall | Reverse | callback

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

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