For Programmers: Free Programming Magazines  


Home > Archive > Tcl > August 2007 > Re: Finding which package loaded









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: Finding which package loaded
MartinLemburg@UGS

2007-08-31, 9:24 am

Hello Charlie,

as said in another thread about the association of file handles and
file names, inside the package mechanism there is no introspection via
the association of package names and related source or shared object
file names!

The only way is currently to overload the package command/procedure
with your own version providing e.g. the subcommand "package location
packageName". Using the "package ifneeded" functionality, Bryan Oakley
pointed out, you would be able to maintain e.g. an array of package
names containing the source or shared object file names.

But ... that's all!

Best regards,

Martin

P.S.: Perhabs you could write a T.I.P. suggesting and implementing
such a introspection feature for the package mechanism?!

----

On Aug 31, 12:27 am, Charlie Bursell <charlie.burs...@quovadx.com>
wrote:
> Is there a way to know from which location a package loaded? If I
> execute "package require xxx", is there a way to know where in the
> auto_path the package was found?


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com