develooper Front page | perl.perl5.porters | Postings from January 2008

Re: "strict refs" not strict enough

Thread Previous | Thread Next
From:
Michael G Schwern
Date:
January 3, 2008 12:46
Subject:
Re: "strict refs" not strict enough
Message ID:
477D4983.9060205@pobox.com
On Fri, Dec 28, 2007 at 03:25:31PM +0100, Aristotle Pagaltzis wrote:
: * Peter Scott <Peter@PSDT.com> [2007-12-28 15:15]:
: > I see 'refs' as mostly useful for slapping the hand of someone
: > who thinks they need to use the contents of one variable as the
: > name of another.
:
: I don’t: there are plenty of legitimate uses for that. Whenever I
: muck around in the symbol table I wish there was an easier way to
: signal my intent to Perl than `no strict 'refs'`.

Will another layer of abstraction help?

$ perl -MAlias -wle 'alias foo => sub { 42 };  print foo()'
42

Alias is so simple and been around for so long... and so universally ignored. :(


-- 
The interface should be as clean as newly fallen snow and its behavior
as explicit as Japanese eel porn.

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About