Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Dynamically Changing Packages w/out Eval

by Ovid (Cardinal)
on Jun 14, 2009 at 11:14 UTC ( [id://771388]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
      foreach my $block ($self->get_blocks) {
          my %data = map { $_ => $block->$_ } qw/
            package
    ...
          END
          $self->_croak($@) if $@;
      }
    
  2. or download this
      foreach my $block ($self->get_blocks) {
          package $block->package;
          eval {
    ...
          };
          $self->_croak($@) if $@;
      }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://771388]
Approved by moritz
Front-paged by Old_Gray_Bear
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (4)
As of 2024-03-29 09:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found