Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

how to know if a module is already loaded?
How do I test if a particular module is loaded on my system?
Bunny

Report this thread to moderator Post Follow-up to this message
Old Post
Bunny
03-27-04 04:12 AM


Re: how to know if a module is already loaded?
Bunny (bunny1112@yahoo.com) wrote:
> How do I test if a particular module is loaded on my system?

That depends on how you interpret that question:

To test whether a module has already been loaded into an application,
consult the %INC hash (where the keys are module_names mangled with
{ $module_name =~ s|::|/|g; $module_name .= '.pm'; } and the value
are the full path to the module).

To test whether a module has been installed, enter

% perl -M<module> -e 1

If you get "Can't locate <module>.pm in @INC (@INC contains ...)"
the module is not installed.

cu,
Martin
--
So long, and thanks        | Martin Vorlaender  |  OpenVMS rules!
for all the books...       | work: mv@pdv-systeme.de
In Memoriam Douglas Adams  |   http://www.pdv-systeme.de/users/martinv/
1952-2001      | home: martin@radiogaga.harz.de

Report this thread to moderator Post Follow-up to this message
Old Post
Martin Vorlaender
03-27-04 04:12 AM


Re: how to know if a module is already loaded?
On 2004-03-20, Bunny <bunny1112@yahoo.com> wrote:
> How do I test if a particular module is loaded on my system?

rv = eval "require Module::Foo";

--
--Arthur Corliss
Bolverk's Lair -- http://arthur.corlissfamily.org/
Digital Mages -- http://www.digitalmages.com/
"Live Free or Die, the Only Way to Live" -- NH State Motto

Report this thread to moderator Post Follow-up to this message
Old Post
Arthur Corliss
03-27-04 04:12 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PERL Modules archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 02:37 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.