in reply to Inheritence of a Constructor that uses a file-scoped lexical?
my $self = { _permitted => \%{$class::fields}, %{$class::fields}, };
If you then call Some::Package::Sub->new, it uses Some::Package::Sub::%fields, which I think is what you want.
Caveat: I have not tested the above code so, although the syntax checks OK, it might not work at all. But even then, it should give you an idea on how to proceed.
CU
Robartes-
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Inheritence of a Constructor that uses a file-scoped lexical?
by blokhead (Monsignor) on Oct 29, 2002 at 18:24 UTC |