Sponsored Content
Full Discussion: Help with Perl Module
Top Forums Shell Programming and Scripting Help with Perl Module Post 302257757 by cbkihong on Thursday 13th of November 2008 03:08:28 AM
Old 11-13-2008
Check whether you need to import any symbols. Sometimes, a set of subroutines is always exported; while at other times you need to specify what you need to import at the "use" statement.

For example, if you look at the examples at the top of Carp - perldoc.perl.org, the "croak" method is exported automatically, while "cluck" needs an explicit import.

For what needs to be imported or not, you'll need to read the module source code, or you ask the maintainer of that module. Typically, if you don't mind the hassle, you can always specify the full package name (e.g. Carp::cluck("XXXX") in the above example) and avoid all those import mess. In my opinion, this is usually a good thing.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Replace Perl Module name in all Perl scripts

I want to replace a Perl module name in all my Perl Scripts in the cgi-bin directory. How is it possible? I have the following statement in my scripts use myUtil; I want to change it to use myUtil777; Regards, Rahul (2 Replies)
Discussion started by: rahulrathod
2 Replies

2. Shell Programming and Scripting

perl module question

Couple questions on perl module.. 1)where is the best place on web where it tells you what modules can do? For example, use Text::Autoformat Where is the best place on line or via command line to find the exact capability of autoformat? 2)Is there already a perl module to read *.cap... (1 Reply)
Discussion started by: convenientstore
1 Replies

3. Shell Programming and Scripting

Perl Module Help

Hi All, I am using a perl module Win32::AdminMisc in my perl script. When i running in activestate perl v5.10.0 it shows folling error --- Can't locate loadable object for module Win32::AdminMisc in @INC (@INC contains: C:/Perl/site/lib C:/Perl/lib .) at example.pl Please reply. ... (7 Replies)
Discussion started by: suprcool
7 Replies

4. UNIX for Dummies Questions & Answers

help in writing perl module

Hi i have written a perl script which was then converted to perl module by me. it works as expected. but i have to put it on many servers so i want to build a package for it. i dont know how to do that. just to check i copied perl module in "lib" directory which is working. ( directly copied... (1 Reply)
Discussion started by: zedex
1 Replies

5. Shell Programming and Scripting

Perl Module

Hi, Please help me!! Im wondering if anyone can help me with a problem i have with some perl modules. My problem is: I'm trying to connect remote host to a unix box from a windows machine. So i'm developing an application to do this. I'm programming it in perl with tcl/tk Gui interface.... (13 Replies)
Discussion started by: Phi01
13 Replies

6. Shell Programming and Scripting

Which Perl Module to use?

Hi, I need to read an excel binary file and write the data to a text file. Is it possible using Spreadsheet-ParseExcel-0.58 ? If not, is there any module available in CPAN to do this? Thanks, Js (1 Reply)
Discussion started by: jisha
1 Replies

7. Shell Programming and Scripting

calling perl subroutine from perl expect module

All, Is it possible to call a subroutine from the perl expect module after logging to a system that is within the same program. My situation is I need to run a logic inside a machine that I'm logging in using the expect module, the logic is also available in the same expect program. Thanks,... (5 Replies)
Discussion started by: arun_maffy
5 Replies

8. Shell Programming and Scripting

Perl SSH without a perl module

I'm trying to create a perl script that will do 1 SSH session, but be able to write multiple commands to the session and receive multiple outputs. I know there are modules out there like Net:SSH::Perl, but I'm not allowed to use it. I was thinking of doing something like an open3 on an ssh... (4 Replies)
Discussion started by: mrwatkin
4 Replies

9. Shell Programming and Scripting

Perl module

I am recieiving an out of memory issue in my perl module while updating the records in the oracle table. Let me know what are the check or troubleshoot steps need to be done from my end to fix the issue. (1 Reply)
Discussion started by: ramkumar15
1 Replies

10. Shell Programming and Scripting

Perl script module

I took the copy of the production module to the home directory and executing the module. one of the test prdmsk.pm module is present in the home directory ctskk. would like to know whether the below syntax is correct. use strict; use lib "/home/ssprod/ctskk"; use lib::Prdmsk; ... (0 Replies)
Discussion started by: ramkumar15
0 Replies
Carp::Clan::Share(3pm)					User Contributed Perl Documentation				    Carp::Clan::Share(3pm)

NAME
Carp::Clan::Share - Share your Carp::Clan settings with your whole Clan VERSION
Version 0.013 SYNOPSIS
package My::Namespace use Carp::Clan::Share; # My::Namespace::Carp now exists ... package My::Namespace::Module use My::Namespace::Carp; # Acts like "use Carp::Clan qw/^My::Namespace::/;" ... package My::Other::Namespace; # You can also pass options through to Carp::Clan use Carp::Clan::Share qw/verbose/; # My::Other::Namespace::Carp now exists ... package My::Other::Namespace::Module use My::Other::Namespace::Carp; # Acts like "use Carp::Clan qw/^My::Other::Namespace:: verbose/;" ... DESCRIPTION
This is a very lightweight helper module (actually just an import method) that will automagically create a __PACKAGE__::Carp module for you. Any arguments passed to the import (e.g. via use) method are forwarded along to Carp::Clan. NOTE: If you use this from a package ending with ::Carp, then it will use the parent of of that package as the target namespace package My::Namespace::Carp; use Carp::Clan::Share; package My::Namespace::Module use My::Namespace::Carp; # Acts like "use Carp::Clan qw/^My::Namespace::/;" SEE ALSO
Carp::Clan Carp AUTHOR
Robert Krimen, "<rkrimen at cpan.org>" BUGS
Please report any bugs or feature requests to "bug-carp-clan-share at rt.cpan.org", or through the web interface at <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Carp-Clan-Share>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. SUPPORT
You can find documentation for this module with the perldoc command. perldoc Carp::Clan::Share You can also look for information at: o RT: CPAN's request tracker <http://rt.cpan.org/NoAuth/Bugs.html?Dist=Carp-Clan-Share> o AnnoCPAN: Annotated CPAN documentation <http://annocpan.org/dist/Carp-Clan-Share> o CPAN Ratings <http://cpanratings.perl.org/d/Carp-Clan-Share> o Search CPAN <http://search.cpan.org/dist/Carp-Clan-Share> ACKNOWLEDGEMENTS
COPYRIGHT &; LICENSE Copyright 2008 Robert Krimen This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.10.0 2009-08-10 Carp::Clan::Share(3pm)
All times are GMT -4. The time now is 08:59 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy