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

    Text::MicroMason::DoubleQuote 2.13

    Download button

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

    License / Price:

    Last Updated:

    Category:
    Matthew Simon Cavalletto | More programs
    Perl Artistic License / FREE
    November 5th, 2007, 21:05 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    Text::MicroMason::DoubleQuote description

    A minimalist Interpolation Engine in Perl.

    Text::MicroMason::DoubleQuote is a minimalist Interpolation Engine in Perl.

    SYNOPSIS

    Instead of using this class directly, pass its name to be mixed in:

    use Text::MicroMason;
    my $mason = Text::MicroMason::Base->new( -DoubleQuote );


    Templates can be written using Perl's double-quote interpolation syntax:

    $coderef = $mason->compile( text => 'Hello $ARGS{name}!' );
    print $coderef->( name => 'World' );


    Text::MicroMason::DoubleQuote uses Perl's double-quoting interpolation as a minimalist syntax for templating.

    Of course you don't need this module for simple cases of interpolation, but if you're already using the MicroMason framework to process template files from disk, this module should allow you to make your simplest templates run even faster.

    To embed values other than simple scalars in a double-quoted expression you can use the ${ expr } syntax. For example, you can interpolate a function call with "${ ( time() ) }" or "@{[mysub(1,2,3)]}". As noted in perldaq4, "this is fraught with quoting and readability problems, but it is possible." In particular, this can quickly become a mess once you start adding loops or conditionals. If you do find yourself making use of this feature, please consider switching to one of the more powerful template syntaxes like Text::MicroMason::HTMLMason.

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    Interpolation Engine | MicroMason framework | Perl module | Interpolation | engine | Perl

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

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