sorry send it again with plain text.

sub make_accessor {
    my($package, $name) = @_;

    no strict qw(refs);

    my $code = <<EOT;
        *{"$package\::$name"} = sub {
            my($self, $value) = @_;

            if(defined $value) {
                $self->{$name} = $value;
            }
            if(exists $self->{$name}) {
                return ($self->{$name});
            } else {
                return "";
            }
        }
EOT
    if(! defined *{"$package::$name"}) {
        eval $code or die "$@";
    }
}



"Jetzt Handykosten senken mit klarmobil - 14 Ct./Min.! Hier klicken"
http://produkte.shopping.freenet.de/handy_voip_isdn/klarmobil/index.html?pid=730025


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to