develooper Front page | perl.perl6.language | Postings from February 2001

Re: End-of-scope actions: Toward a hybrid approach.

Thread Previous | Thread Next
From:
schwern
Date:
February 21, 2001 10:25
Subject:
Re: End-of-scope actions: Toward a hybrid approach.
Message ID:
20010221132523.A21126@magnonel.guild.net
On Tue, Feb 20, 2001 at 02:19:18PM +0000, Simon Cozens wrote:
> Sort of. What I really wanted to do was to be able to say
> 
> sub foo { ... }
> builtinify(foo);
> 
> package bar;
> foo(); # Refers to main::foo
> package baz;
> foo(); # Refers to main::foo
> 
> (this is so that the forthcoming Safety::First module can produce exported
> functions available throughout the program)

Look at Dunce::Files.  I suspect we have similar spirits here, but I
never was able to solve the above problem.  Fortunately, I think I can
simply drop Sub::Versive into Dunce::Files in place of
Function::Override and have it be truly global.

I was about to say "What are the odds that someone will use
UNIVERSAL::AUTOLOAD?!" before realizing I use it in about three
modules. :(

Let me know what Safety::First does (is going to do)


> > Want to merge implementations?
> 
> I'm open to offers. Take a look at S::V and tell me what you think.

I was wondering how you were planning on doing this without a core
hack... and it looks like you're doing a core hack. :(

So, could you explain the CvGV magic there?  In POD form?  Preferably
in ext/Devel/Peek/Peek.pm?  (subtle hint, there's no docs)

The two things which worry me in this implementation is its reliance
on an autoloader (always icky) and the 5.6.1 requirement.  Is there
any way we can cut that down?

-- 
Michael G Schwern   <schwern@pobox.com>   http://www.pobox.com/~schwern/
Perl6 Quality Assurance     <perl-qa@perl.org>       Kwalitee Is Job One

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