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

    MooseX::Templated::Role 0.02-1

    Download button

    No screenshots available
    Downloads: 231  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Ian Sillitoe | More programs
    Perl Artistic License / FREE
    June 9th, 2009, 11:13 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    MooseX::Templated::Role description

    Role to render a Moose class with template

    MooseX::Templated::Role is a Perl module with the role to render a Moose class with template.

    SYNOPSIS

    Farm/Cow.pm

     package Farm::Cow;
     use Moose;
     with 'MooseX::Templated::Role';

     has 'spots' => ( is => 'rw' );
     has 'hobbies' => ( is => 'rw', default => sub { ['mooing', 'chewing'] } );

     sub moo { "Moooooooo!" }


    Farm/Cow.tt

     This cow has [% self.spots %] spots - it likes
     [% self.hobbies.join(" and ") %].
     [% self.moo %]!


    Elsewhere on the Farm...

     my $cow = Farm::Cow->new( spots => '8' );
     
     $cow->render();
     
     # This cow has 8 spots - it likes
     # mooing and chewing.
     # Moooooooo!



    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    moose class | Perl module | Perl | MooseX | class

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

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