Eric Strom (ASG)
- Website: metacpan.org/author/ASG
- About: https://metacpan.org/author/ASG
Recent Actions
-
Posted Introducing <tt>here</tt> to Eric Strom (ASG)
I've just published the first release of the here module, a mechanism for safely inserting generated code into a compiling program. this can be used to write macros, cut down on boiler plate, and to implement new declarations, all without ever having to parse any perl source code.
… -
Posted Introducing Begin::Declare to Eric Strom (ASG)
While working on a module for source code injection, one of my example "macros" was one that allows you to declare and assign to a lexical variable at compile time, without having to write the variable names twice. That concept more or less hijacked the conversation, and after some…
-
Commented on Ruby like code blocks in Perl
Rather than passing the object to the subroutine, why not place it into $_ sub up { my $self = shift; $self->create_table(authors => sub { $_->add_column(...); $_->add_column(...); }); }...
Comment Threads
-
Forward Ever commented on
Ruby like code blocks in Perl
okay, this would also be possible, but like a named parameter more (it is more obvious that $t or $table is the table object, which might be easier to explain to end users)
-
awwaiid (Brock Wilcox) commented on
Ruby like code blocks in Perl
You could do both $_ and the named param :)
About blogs.perl.org
blogs.perl.org is a common blogging platform for the Perl community. Written in Perl and offering the modern features you’ve come to expect in blog platforms, the site is run by Dave Cross and Aaron Crane, with a design donated by Six Apart, Ltd.