Softpedia
 


LINUX CATEGORIES:



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

    Text::MicroMason::Functions 2.13

    Download button

    No screenshots available
    Downloads: 355  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
    July 10th, 2007, 12:05 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    Text::MicroMason::Functions description

    A module which contains Function Exporter for Simple Mason Templates.

    Text::MicroMason::Functions Perl module contains Function Exporter for Simple Mason Templates.

    SYNOPSIS

    Use the execute function to parse and evalute a template:

    use Text::MicroMason::Functions qw( execute );
    print execute($template, 'name'=>'Dave');


    Or compile it into a subroutine, and evaluate repeatedly:

    use Text::MicroMason::Functions qw( compile );
    $coderef = compile($template);
    print $coderef->('name'=>'Dave');
    print $coderef->('name'=>'Bob');


    Templates stored in files can be run directly or included in others:

    use Text::MicroMason::Functions qw( execute_file );
    print execute_file( "./greeting.msn", 'name'=>'Charles');


    Safe usage restricts templates from accessing your files or data:

    use Text::MicroMason::Functions qw( safe_execute );
    print safe_execute( $template, 'name'=>'Bob');

    All above functions are available in an error-catching "try_*" form:

    use Text::MicroMason::Functions qw( try_execute );
    ($result, $error) = try_execute( $template, 'name'=>'Alice');


    As an alternative to the object-oriented interface, text containing MicroMason markup code can be compiled and executed by calling the following functions.
    Please note that this interface is maintained primarily for backward compatibility with version 1 of Text::MicroMason, and it does not provide access to some of the newer features.

    Each function creates a new MicroMason object, including any necessary traits such as Safe compilation or CatchErrors for exceptions, and then passes its arguments to an appropriate method on that object.

    You may import any of these functions by including their names in your use Text::MicroMason statement.

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    Function Exporter | Simple Mason Templates | Perl module | Text | Function | Exporter

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

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