Skip to content

Squatting 0.60 hits CPAN

April 27, 2009

Hot on the hooves of Catalyst 5.8 (CataMoose) hitting CPAN came the latest version of Squatting (web microframework) following very close on its tail.

Here are some new things to look out for in latest Squatting…

Squatting::H is hash based object loosely based on Camping::H (Ruby). Here is an example from its pod to make you puurrrr a little ;-)

my $cat = Squatting::H->new({
    name => 'kurochan',
    meow => sub { "me" . "o" x length($_[0]->name) . "w" }
});

my $kitty = $cat->clone({ name => 'max' });

$cat->name;                     # "kurochan"
$kitty->name;                   # "max"
$cat->meow;                     # "meoooooooow"
$kitty->meow;                   # "meooow"
$cat->age(3);                   # 3
$kitty->age(2);                 # 2
$kitty->slots;                  # qw(name meow age)

/I3az/

About these ads
No comments yet

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: