Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^2: Self creating OO Module field accessors...

by hv (Parson)
on Jan 13, 2006 at 11:41 UTC ( #522955=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    for my $prop (qw [field1 field2 field3]) {
        eval sprintf <<'END', ($prop) x 3;
    ...
        }
    END
    }
    
  2. or download this
    for my $method (qw/ field1 field2 field3 /) {
      no strict 'refs';
    ...
        return $self->{$method};
      };
    }
    
  3. or download this
      for my $method (qw/ ... /) {
        my $sub = sub { the code ... };
        no strict 'refs';
        *$method = $sub;
      }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://522955]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2022-05-28 21:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (101 votes). Check out past polls.

    Notices?