in reply to Re: Re: Lexical::Alias & subroutines
in thread Lexical::Alias & subroutines
In your first example
sub foo { my $x = $_[0] eq 'whatever' ? $_[1] : $_[2]; ... }
Seems just as effective. But in your second, I agree. I've looked enviously at the perlsub examples of using globs to avoid the need to dereference refs and wished for a way to do the same thing with lexicals. Maybe Diotalevi's Lexical::TypeGlob would work for that? I haven't gotten around to playing with it yet.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Lexical::Alias & subroutines
by Jenda (Abbot) on May 19, 2003 at 15:56 UTC | |
by BrowserUk (Patriarch) on May 19, 2003 at 17:08 UTC |