Help for this page

Select Code to Download


  1. or download this
    # Somewhere inside the object's package
    sub get_set :lvalue {
    ...
    my $obj = Some::Object->new();
    $obj->get_set( 'name' ) = 'Limbic';
    print "Hello, ", $obj->get_set( 'name' ), "\n";
    
  2. or download this
    sub get_set :lvalue {
        my ($self, $key) = @_;
        my $junk;
        key_ok( $key ) ? $self->{ $key } : $junk;
    }