Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

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

by hv (Prior)
on Jan 13, 2006 at 11:41 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2024-04-25 18:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found