develooper Front page | perl.perl5.porters | Postings from November 2001

Re: restricted hashes, and other readonlyness (was "clamp...")

Thread Previous | Thread Next
Nick Ing-Simmons
November 5, 2001 01:13
Re: restricted hashes, and other readonlyness (was "clamp...")
Message ID:
Graham Barr <> writes:
>> >      Net::FTP object
>> A possible - Graham care to comment?
>the only classes I can think of where you would want to restrict the keys
>are ones where you want to prohibit sub-classes.

I am assuming that either the base-class's "new" asks the class what
its keys are, or new is overriden in the subclass:

sub new
 my ($class,...) = @_;
 my %self;

>Net::FTP is a sub-class
>of IO::Socket::INET, so IO::Socket::INET cannot be restricted and I have
>seen people sub-class Net::FTP too.
Nick Ing-Simmons

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About