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

Re: Source/Program metadata from within a program

Thread Previous | Thread Next
From:
Bryan C . Warnock
Date:
August 30, 2001 22:18
Subject:
Re: Source/Program metadata from within a program
Message ID:
01083101151201.01104@wakko.idiocity.nut
On Friday 31 August 2001 01:13 am, Michael G Schwern wrote:
> On Fri, Aug 31, 2001 at 12:45:03AM -0400, Bryan C. Warnock wrote:
> > Access to the source code.
>
> Already got that.

Not if we don't have the source.  Or perhaps this will be the way we do it.  
Dunno.  Perl Bytecode has a section for storing the source code.  I was 
thinking more of that.

>
> > Compilation time.  For each of my compilation units, I would like to
> > know when it was compiled.  Compilation unit scoped.
>
> You can already do that.  Override CORE::GLOBAL::require/use/do.
>
> Your overridden require/use/do can mark the time it was called *and*
> remember the *DATA filehandles.  On an error, you can do:

Not called.  Compiled.  Once again, I'm thinking of pre-compiled bytecode 
modules.

>
> When will we be seeing the CPAN module for this?

Looks like you just wrote it.  :-)


-- 
Bryan C. Warnock
bwarnock@capita.com

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