Inline::Mason is an inline Mason script for Perl.
SYNOPSIS
package MY::Mason;
use Inline::Mason 'as_subs';
our @ISA = qw(Inline::Mason);
print Inline::Mason::generate('HELLO');
print Inline::Mason::HELLO();
print HELLO();
print NIFTY(lang => 'Perl');
__END__
__HELLO__
% my $noun = 'World';
Hello < % $noun % >!
How are ya?
__NIFTY__
< % $ARGS{lang} % > is nifty!
FUNCTIONS
load_mason
Create mason scripts in place, and you can pass a list of pairs.
Inline::Mason::load_mason
(
BEATLES
=>
'Nothing's gonna change my ',
# ... ... ...
);
print BEATLES(what => 'world');
load_file
Load an external file manually and explicitly, and the scripts will belong to the caller's package. This is a safer and more robust way when Inline::Mason is used across several files and packages.
use Inline::Mason qw(passive as_subs);
Inline::Mason::load_file('external_mason.txt');
Product's homepage
Requirements:
· Perl