[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]

Re: Class::Fields, a base/fields.pm rewrite



On Sat, Jan 08, 2000 at 10:59:09PM -0500, Michael G Schwern wrote:
> sub has_fields {
>         my($class) = shift;
>         my $fglob;
>         return $fglob = ${"$class\::"}{"FIELDS"} and *$fglob{HASH};

Probably '&&', not 'and'.

> }

  sub has_fields { *{ ${ shift() . '::' }{FIELDS} || \*has_fields }{HASH} }

1/2 ;-)

Ilya


Follow-Ups from:
Michael G Schwern <schwern@pobox.com>
References to:
Michael G Schwern <schwern@pobox.com>
Ilya Zakharevich <ilya@math.ohio-state.edu>
Michael G Schwern <schwern@pobox.com>

[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]