Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Preventing autovivification while accessing value

by naikonta (Curate)
on Jan 28, 2008 at 14:44 UTC ( #664688=perlmeditation: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub somefunc {
      my($self, $context) = @_;
    ...
      # I can work with $form
      ...
    }
    
  2. or download this
    sub is_hash {
      my($hash, @keys) = @_;
    ...
    
      return $yes ? $hash : $yes;
    }
    
  3. or download this
    return 1
      unless my $form = is_hash($self->{config}, 'key1', 'context', $conte
    +xt, 'form');
    
  4. or download this
      $somedata, $key1, $key2, $idx3, $key4 ....;
    
  5. or download this
      my $wanted = 'CODE';
      # if key3 has a value but not a CODE ref, it croaks
      my $code = thefunc($somedata, $wanted, 'key1', 'key2', 'key3');
      $code->(@someargs);
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://664688]
Approved by lidden
Front-paged by grinder
help
Chatterbox?
[virtualsue]: 1nickt thatch repair just finishing
[virtualsue]: they've done enough to get it through winter
holli loves lightning talks
[1nickt]: ... but not the last straw?
1nickt ducks
virtualsue will be sweeping/raking it up for days
[virtualsue]: I need to get some cat pics into my talk http://www.cat- lovers-only.com/ images/three-cat- burritos-to-go-500 .jpg

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (9)
As of 2017-11-21 12:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (299 votes). Check out past polls.

    Notices?