JK Web Studio

Specializing in efficient and user friendly web design solutions

info@jkwebstudio.com

Archive for December, 2009

New Muppet Vid: Bohemian Rhapsody

Wednesday, December 9th, 2009

New Muppet Vid: Bohemian Rhapsody

Capturing both a Mason component’s output and return value

Wednesday, December 2nd, 2009

From the mason manual:

As of 1.10, component calls can accept an initial hash reference of modifiers. The only currently supported modifier is store, which stores the component’s output in a scalar reference. For example:

my $buf;
my $return = $m->comp( { store => \$buf }, ‘/some/comp’, type => ‘big’ );

This mostly duplicates the behavior of scomp, but can be useful in rare cases where you need to capture both a component’s output and return value.

This modifier can be used with the <& &> tag as well, for example:

<& { store => \$buf }, ‘/some/comp’, size => ‘medium’ &>

24 ways - web design and development articles and tutorials for advent

Tuesday, December 1st, 2009

It is that wonderful time of year again. Head over to 24ways.org for you daily dose of web design and development articles and tutorials.