how to create custom modules in perl and how to import all modules with single command?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting how to create custom modules in perl and how to import all modules with single command?
# 1  
Old 04-02-2012
how to create custom modules in perl and how to import all modules with single command?

I have some custom functions which i want to use in perl Scripting all time.
i want to How to create modules in perl and how to import them.
Also if i create 15 modules and i want to > import all at once then how can i import?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Perl Modules installation in one go.

Hi, I have a task to install a list of perl modules in several servers. It's very tedious task to install it one by one through CPAN. Can I have option in CPAN to feed that list so that it install all the modules. (0 Replies)
Discussion started by: nixhead
0 Replies

2. Shell Programming and Scripting

Script to install Perl Modules

Hi guys, I need to upgrade perl modules on about multiple machines. I'm writing a for loop for it. for i in 1 2 3 4 5 6; do ssh server$i " sudo cpan Mozilla::CA, sudo cpan LWP::UserAgent, sudo cpan LWP::Protocol::https, sudo cpan IO::Socket::SSL, sudo cpan Net::SSL,... (2 Replies)
Discussion started by: scj2012
2 Replies

3. Shell Programming and Scripting

perl modules installation

I have installed perl in windows. Now I would like to install spreadsheet::xlsx & DateTime::Format::Excel modules(also few more) at a time instead of installing them seperately. Could you please let me know how to install more than 1 module as a batch file in windows OS ? Thanks in... (5 Replies)
Discussion started by: giridhar276
5 Replies

4. Shell Programming and Scripting

How to find which perl modules version is used?

Hi All, I am rather new to the world of Perl programming. I have a question regarding the perl modules. I have a linux box running slackware 12.2 and has perl installed by default there (version 5.10.0) and it has several modules installed namely DBI and DBD::mysql that I wanted to upgrade. ... (2 Replies)
Discussion started by: aherrys
2 Replies

5. Red Hat

installing perl modules

Hi All, I have a customer asking me to install these perl modules on redhat 4 ent: File::Temp Getopt::Long DBD::mysql Mail::Mailer DBD::DB2 Any idea how can I install those modules. Thanks for any comment you may add. (3 Replies)
Discussion started by: itik
3 Replies

6. Shell Programming and Scripting

How to install perl modules

Hi. i installed perl 5.8.8.822 in my D: drive(windows xp).When im trying to install IO-Stringy.pm module( or any module for tat matter ) it is getting installed in 'c:\temp\please run installed script' folder no matter from where ever i run the ppm installation.The path variable is set to... (3 Replies)
Discussion started by: Anuj8584
3 Replies

7. UNIX for Advanced & Expert Users

Installing GD Perl graphics modules

I'm on Mac OSX, I *think* I succeeded in installing libpng. I can see usr/local/lib/libpng.dylib and its brethren are in place after executing ./configure nd and the holy make install. (2 Replies)
Discussion started by: andrewduncan
2 Replies

8. UNIX for Dummies Questions & Answers

installing perl modules

I resulted to using /usr/sfw/bin/gmake to install my perl modules until i ran into a problem installing perl/Tk Tk-804.028 gmake: Entering directory `/export/home/Tk-804.028/pod' Sorry no HTML building yet gmake: Leaving directory `/export/home/Tk-804.028/pod' I dont unstand what the error... (2 Replies)
Discussion started by: jameskay
2 Replies

9. Shell Programming and Scripting

extracting used perl modules

Hi, I am trying to extract the includes from all the perl programs in my application space;ie. i want the list of all used modules in my application. First i did a grep like 'grep -r "^use.*;$" * > ~dileepp/search.txt' which gives me the output in the form "filename:line containing use"... (0 Replies)
Discussion started by: DILEEP410
0 Replies

10. Shell Programming and Scripting

Installing Perl Modules

I have a script that uses the File::Listing module. I am trying to install it, but I read the ReadMe and it states that the following modules should be installed first: URI MIME-Base64 HTML-Parser libnet Digest-MD5 Compress-Zlib I am very new to Perl and would apprciate anyone's input on... (1 Reply)
Discussion started by: ssmiths001
1 Replies
Login or Register to Ask a Question
lib::core::only(3)					User Contributed Perl Documentation					lib::core::only(3)

NAME
lib::core::only - Remove all non-core paths from @INC to avoid site/vendor dirs SYNOPSIS
use lib::core::only; # now @INC contains only the two core directories To get only the core directories plus the ones for the local::lib in scope: $ perl -Mlib::core::only -Mlocal::lib=~/perl5 myscript.pl To attempt to do a self-contained build (but note this will not reliably propagate into subprocesses, see the CAVEATS below): $ PERL5OPT='-Mlib::core::only -Mlocal::lib=~/perl5' cpan DESCRIPTION
lib::core::only is simply a shortcut to say "please reduce my @INC to only the core lib and archlib (architecture-specific lib) directories of this perl". You might want to do this to ensure a local::lib contains only the code you need, or to test an App::FatPacker tree, or to avoid known bad vendor packages. You might want to use this to try and install a self-contained tree of perl modules. Be warned that that probably won't work (see "CAVEATS"). This module was extracted from local::lib's --self-contained feature, and contains the only part that ever worked. I apologise to anybody who thought anything else did. CAVEATS
This does not propagate properly across perl invocations like local::lib's stuff does. It can't. It's only a module import, so it only affects the specific perl VM instance in which you load and import() it. If you want to cascade it across invocations, you can set the PERL5OPT environment variable to '-Mlib::core::only' and it'll sort of work. But be aware that taint mode ignores this, so some modules' build and test code probably will as well. You also need to be aware that perl's command line options are not processed in order - -I options take effect before -M options, so perl -Mlib::core::only -Ilib is unlike to do what you want - it's exactly equivalent to: perl -Mlib::core::only If you want to combine a core-only @INC with additional paths, you need to add the additional paths using -M options and the lib module: perl -Mlib::core::only -Mlib=lib # or if you're trying to test compiled code: perl -Mlib::core::only -Mblib For more information on the impossibility of sanely propagating this across module builds without help from the build program, see <http://www.shadowcat.co.uk/blog/matt-s-trout/tainted-love> - and for ways to achieve the old --self-contained feature's results, look at App::FatPacker's tree function, and at App::cpanminus's --local-lib-contained feature. AUTHOR
Matt S. Trout <mst@shadowcat.co.uk> LICENSE
This library is free software under the same terms as perl itself. COPYRIGHT
(c) 2010 the lib::core::only "AUTHOR" as specified above. perl v5.16.3 2013-02-12 lib::core::only(3)