[Petal] [PATCH] Options via constructor rather than package
globals
Steve Purkis
spurkis at mkdoc.com
Thu Jun 5 11:49:43 BST 2003
On Thursday, June 5, 2003, at 10:26 am, Steve Purkis wrote:
> [snip]
> And as for implementing (2), at the moment I do something like this:
Sorry - cut-n-paste from the worng project. In Petal-style, that's:
# Petal::Hash object
sub hash
{
my $self = shift;
if (@_) { $self->{-hash} = shift; return $self; }
else { return $self->{-hash}; }
}
Which is still long winded but consistent, which is important. That's
another point I forgot to make... :)
-Steve
More information about the Petal
mailing list