SlideShare ist ein Scribd-Unternehmen logo
1 von 26
Downloaden Sie, um offline zu lesen
Managing Perl Installations:
    A SysAdmin’s View 1,2,3

                                          Baden Hughes
Department of Computer Science and Software Engineering
                             The University of Melbourne
                           badenh@csse.unimelb.edu.au




                                                           1
What the title really means …

 Managing Perl Installations:
 A SysAdmin’s View 1
   Useful things a SysAdmin should know about Perl
 Managing Perl Installations:
 A SysAdmin’s View 2
   What you can do if you actually RTFM
 Managing Perl Installations:
 A SysAdmin’s View 3
   5327 other things you can do with CPAN

                                                     2
Overview

 Perl, Modules, CPAN
 Problems and Objectives
 The Sharp and Pointy Bits
   Module Management
   Bundles
   Working within User-space
 Conclusion

                               3
Perl
 http://www.perl.org
 Perl is a dynamic procedural programming
 language
 Designed by Larry Wall, maintained as open
 source project
 First released in 1987
 Perl borrows features from C, shell scripting
 (sh), awk, sed, Lisp, and (to a lesser extent)
 many other programming languages.
 Ubiquitous
                                                  4
Perl Modules

 A Perl module is a discrete component of
 software for the Perl programming language.
 Modules distinguished by a unique namespace,
 e.g. quot;CGIquot; or quot;Net::FTPquot; or quot;XML::Parserquot;.
 Convention of one module per file with a *.pm
 extension.
 Collection of one or more modules, with
 accompanying documentation (yes, really) and
 build scripts, compose a package.

                                                 5
CPAN

 Comprehensive Perl Archive Network
   http://cpan.org
   A large collection of Perl software (modules,
   packages and scripts) and associated
   documentation
 A Perl module (CPAN.pm)
    perl –MCPAN –e shell
   Used to download and install Perl software from
   the CPAN archive
                                                   6
Scoping the Problem
 On multi-user systems, particularly where there
 are Perl-oriented developers of some flavour,
 being responsible for Perl can be quite onerous
 The defaults for maintaining Perl on a shared
 system are typically
   Every user compiles and runs their own version of Perl
   Constant trickle of requests for Perl and/or module
   upgrades and/or additions
 Naturally neither of these are considered
 desirable by typical sysadmins since they have
 both system resource and human effort
 constraints
                                                            7
Objectives

 Get smarter: Perl itself can make managing a
 Perl installation on a shared system much easier
 Objectives
   Demonstrate ways to manage Perl installations based
   on commonly occurring tasks
   Show ‘core Perl’ methods that work everywhere, not
   distribution specific methods which only work on one
   platform
 Get users to help you, rather than the other way
 around
                                                          8
Modules

 Which modules are on my system ?
 Installing modules
 Removing modules




                                    9
Q: Which modules are on my system ?
A: perldoc perllocal

    perldoc perllocal will identify a list of
    modules, their version, location etc.
Tue Oct    4 17:00:07 2005: quot;Modulequot; Geo::GNIS
*   quot;installed into: /usr/lib/perl5/site_perl/5.8.5quot;
*   quot;LINKTYPE: dynamicquot;
*   quot;VERSION: 0.01quot;
*   quot;EXE_FILES: quot;




                                                       10
Q: Which modules are on my system ?
A: ExtUtils::Installed
 Use the ExtUtils::Installed module
  #!/usr/local/bin/perl
  use ExtUtils::Installed;
  my $instmod = ExtUtils::Installed->new();
  foreach my $module ($instmod->modules())
  {
     my $version = $instmod->version($module) || quot;???quot;;
     print quot;$module -- $versionnquot;;
   }

       produces a list of modules and their version(s)
 ExtUtils::Installed is in the standard Perl installation, and uses the
 installation generated files for modules to determine status


                                                                          11
Q: Which modules are on my system ?
A: pmtools
 The pmtools suite to help navigate and
 manage Perl module installations
 Obtain them at
 http://language.perl.com/misc/pmtools-
 1.00.tar.gz.
 pmtools -- a suite of small programs to help
 manage modules
   pmpath - show the module' full path
                               s
   pmvers - get a module version number
   pmdesc - get a module description
   pmall - get all installed modules pmdesc descriptions
   pminst - find what' installed
                        s
                                                           12
Installing Modules

 With CPAN.pm, installing a new module is
 trivial:
 perl -MCPAN -e 'install Esoteric::Module’
 Finding which modules exist and their
 versions can also be done directly via
 CPAN
  cpan > i $KEYWORD


                                             13
Removing Modules (1)
 By using the ExtUtils::Installed and ExtUtils::Packlist
 modules that come with Perl
 #!/usr/local/bin/perl -w
 use ExtUtils::Packlist;
 use ExtUtils::Installed;
 $ARGV[0] or die quot;Usage: $0 Module::Namenquot;;
 my $mod = $ARGV[0];
 my $inst = ExtUtils::Installed->new();
 foreach my $item (sort($inst->files($mod)))
 {
  print quot;removing $itemnquot;;
  unlink $item;
 }
 my $packfile = $inst->packlist($mod)->packlist_file();
 print quot;removing $packfilenquot;;
 unlink $packfile;
                                                           14
Removing Modules (2)

 PPM can uninstall modules
 shell>ppm remove $MODULE-NAME
 CPAN.pm doesn’t have a ‘remove’ option




                                          15
Bundles

 What is a Bundle ?
 Which Bundles exist ?
 Making Bundles (single point of Perl
 administration for multiple systems)




                                        16
Q: What is a Bundle ?
 A bundle is quot;A group of related modules on CPAN (or
 some repository“
   A bundle can be any collection of modules, related or not.
 Bundles are used by CPAN.pm to install a group of
 modules quickly and easily.
 A bundle is essentially a module in the Bundle::
 namespace that has all the look and feel of a module but
 really isn'since it contains no code instead having a
           t
 manifest of modules to be installed.
 There are a number of existing module bundles that you
 can view as examples to help in building your own.


                                                                17
Q: Which Bundles already exist ?
   You can get a list of bundle distributions on search.cpan.org and CPAN.pm also lists
   all currently available bundles when you type ' at the prompt.
                                                   b'
cpan> b Bundle
   Bundle::ABH (A/AB/ABH/Bundle-ABH-1.04.tar.gz) Bundle
   Bundle::AO::Base (I/IX/IX/AO-0.32.tar.gz) Bundle
   Bundle::AO::Standard (I/IX/IX/AO-0.32.tar.gz) Bundle
   Bundle::Apache (D/DO/DOUGM/mod_perl-1.25.tar.gz) Bundle
   Bundle::Apache::ASP (C/CH/CHAMAS/Apache-ASP-2.09.tar.gz) Bundle
   If you give ' a module argument it will list extended information about the bundle
                b'
   itself.
cpan> b Bundle::DBI
Bundle id = Bundle::DBI
CPAN_USERID TIMB (Tim Bunce <Tim.Bunce@pobox.com>)
CPAN_VERSION 1.03
CPAN_FILE T/TI/TIMB/DBI-1.15.tar.gz
MANPAGE Bundle::DBI - A bundle to install DBI and required
   modules.
CONTAINS Storable Net::Daemon RPC::PlServer Getopt::Long DBI
INST_FILE /usr/local/lib/perl5/site_perl/5.005/sun4-
   solaris/Bundle/DBI.pm
INST_VERSION 1.03
                                                                                     18
Q: How can I make a Bundle ?
 Use the autobundle feature of CPAN.pm
 autobundle will, if no arguments are given, inventory
 all modules installed on the system and make a
 systemwide bundle.
 If you only want a few modules in the bundle you can
 simply give it a list of modules and it will do the rest.
 user@host /home/user/> perl -MCPAN -eshell cpan>
   autobundle CGI Crypt::Rot13 Date::Christmas
   Date::Manip
 By default bundles are named
 quot;Snapshot_YYYY_MM_DD_HH_MM_SS.pmquot;
 The resultant file may then be used with the CPAN.pm
 perl -MCPAN -e 'install Bundle::Snapshot_2006_04_09_10_36_24.pm'

                                                                    19
Bundles and System Administration

 Bundles are a very convenient way to
 maintain homogeneous installations
 across multiple systems, including across
 architectures
   Personal experience: create bundles for local
   and external modules; store bundles in a
   repository; checkout and install sequentially on
   development, test and production servers;
   single install experience, guaranteed
   homogeneity

                                                      20
User-space Perl


 Alternative locations for Modules
 Standard Perl plus Custom Modules
 User-specific CPAN




                                     21
Working with Perl in User Space

 Advanced users often want more control
 over their Perl installation on shared
 systems
 SysAdmins are reluctant to let users “do
 as they see fit” to system wide utilities
 CPAN requires elevated privileges
 Fortunately Perl offers several ways
 around this problem
                                             22
Installing Perl Modules in
Alternative Locations
 Any manually installed Perl module can be trivially
 installed in an alternative location, eg within ~/
 Set PREFIX and LIB when you run the Makefile.PL to
 install
    LIB is where the module files will go
    PREFIX is the stub directory for everything else
 user@host$ perl Makefile.PL 
 LIB=/home/user/lib 
 PREFIX=/home/user/lib
 The reason this works is because Perl has a standard
 way of installing modules, called MakeMaker


                                                        23
Standard Perl + Custom Modules

  Sometimes however, a user simply wants to
  install a few modules but use the standard
  system wide Perl installation
  In this case, setting the PERL5LIB environment
  variable can allow the inclusion of modules
  installed in non-standard locations

PERL5LIB=${PERL5LIB:+$PERL5LIB:}$HOME/lib/perl5



                                                   24
User-space CPAN

 CPAN can be configured differently for each
 user, and can install modules to custom
 locations on a system, eg ~/lib/perl5 and
 ~/share/man
 MyConfig.pm is a base module for precisely
 this purpose, and can be used in place of a
 standard CPAN.pm
 Allows users to directly use CPAN functionality,
 with no run time environment variables required

                                                    25
Conclusion

 Perl is ubiquitous
 On shared systems, Perl has native tools
 to reduce the administrative overhead
 Users can be empowered to maintain their
 own Perl infrastructure without significant
 effort
 RTFM’ing can actually be beneficial

                                           26

Weitere ähnliche Inhalte

Was ist angesagt?

The Gory Details of Debian packages
The Gory Details of Debian packagesThe Gory Details of Debian packages
The Gory Details of Debian packagesJeremiah Foster
 
Hands on Docker - Launch your own LEMP or LAMP stack
Hands on Docker -  Launch your own LEMP or LAMP stackHands on Docker -  Launch your own LEMP or LAMP stack
Hands on Docker - Launch your own LEMP or LAMP stackDana Luther
 
&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />tutorialsruby
 
R hive tutorial supplement 2 - Installing Hive
R hive tutorial supplement 2 - Installing HiveR hive tutorial supplement 2 - Installing Hive
R hive tutorial supplement 2 - Installing HiveAiden Seonghak Hong
 
]project-open[ Package Manager
]project-open[ Package Manager]project-open[ Package Manager
]project-open[ Package ManagerKlaus Hofeditz
 
R hive tutorial supplement 1 - Installing Hadoop
R hive tutorial supplement 1 - Installing HadoopR hive tutorial supplement 1 - Installing Hadoop
R hive tutorial supplement 1 - Installing HadoopAiden Seonghak Hong
 
How To Install Openbravo ERP 2.50 MP43 in Ubuntu
How To Install Openbravo ERP 2.50 MP43 in UbuntuHow To Install Openbravo ERP 2.50 MP43 in Ubuntu
How To Install Openbravo ERP 2.50 MP43 in UbuntuWirabumi Software
 
Prizm Installation Guide
Prizm Installation GuidePrizm Installation Guide
Prizm Installation Guidevjvarenya
 
How to build your own OpenStack distro using Puppet OpenStack
How to build your own OpenStack distro using Puppet OpenStackHow to build your own OpenStack distro using Puppet OpenStack
How to build your own OpenStack distro using Puppet OpenStackOpenStack
 
Drupal in Libraries
Drupal in LibrariesDrupal in Libraries
Drupal in LibrariesCary Gordon
 
Configure, Pack and Distribute: An RPM Creation Workshop
Configure, Pack and Distribute: An RPM Creation WorkshopConfigure, Pack and Distribute: An RPM Creation Workshop
Configure, Pack and Distribute: An RPM Creation WorkshopNovell
 
APACHE
APACHEAPACHE
APACHEARJUN
 

Was ist angesagt? (19)

Puppet: From 0 to 100 in 30 minutes
Puppet: From 0 to 100 in 30 minutesPuppet: From 0 to 100 in 30 minutes
Puppet: From 0 to 100 in 30 minutes
 
The Gory Details of Debian packages
The Gory Details of Debian packagesThe Gory Details of Debian packages
The Gory Details of Debian packages
 
Hands on Docker - Launch your own LEMP or LAMP stack
Hands on Docker -  Launch your own LEMP or LAMP stackHands on Docker -  Launch your own LEMP or LAMP stack
Hands on Docker - Launch your own LEMP or LAMP stack
 
&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />
 
Easy install
Easy installEasy install
Easy install
 
R hive tutorial supplement 2 - Installing Hive
R hive tutorial supplement 2 - Installing HiveR hive tutorial supplement 2 - Installing Hive
R hive tutorial supplement 2 - Installing Hive
 
Raj apache
Raj apacheRaj apache
Raj apache
 
]project-open[ Package Manager
]project-open[ Package Manager]project-open[ Package Manager
]project-open[ Package Manager
 
R hive tutorial supplement 1 - Installing Hadoop
R hive tutorial supplement 1 - Installing HadoopR hive tutorial supplement 1 - Installing Hadoop
R hive tutorial supplement 1 - Installing Hadoop
 
12 yum
12  yum12  yum
12 yum
 
How To Install Openbravo ERP 2.50 MP43 in Ubuntu
How To Install Openbravo ERP 2.50 MP43 in UbuntuHow To Install Openbravo ERP 2.50 MP43 in Ubuntu
How To Install Openbravo ERP 2.50 MP43 in Ubuntu
 
Prizm Installation Guide
Prizm Installation GuidePrizm Installation Guide
Prizm Installation Guide
 
How to build your own OpenStack distro using Puppet OpenStack
How to build your own OpenStack distro using Puppet OpenStackHow to build your own OpenStack distro using Puppet OpenStack
How to build your own OpenStack distro using Puppet OpenStack
 
Drupal in Libraries
Drupal in LibrariesDrupal in Libraries
Drupal in Libraries
 
are available here
are available hereare available here
are available here
 
Refcard en-a4
Refcard en-a4Refcard en-a4
Refcard en-a4
 
Yum (Linux)
Yum (Linux) Yum (Linux)
Yum (Linux)
 
Configure, Pack and Distribute: An RPM Creation Workshop
Configure, Pack and Distribute: An RPM Creation WorkshopConfigure, Pack and Distribute: An RPM Creation Workshop
Configure, Pack and Distribute: An RPM Creation Workshop
 
APACHE
APACHEAPACHE
APACHE
 

Andere mochten auch

Soc 02 Stross Justin
Soc 02 Stross JustinSoc 02 Stross Justin
Soc 02 Stross Justinstrossj1
 
Iad1 Q2 Hoorcollege 2 Labels En Visuele Structuur
Iad1 Q2 Hoorcollege 2   Labels En Visuele StructuurIad1 Q2 Hoorcollege 2   Labels En Visuele Structuur
Iad1 Q2 Hoorcollege 2 Labels En Visuele StructuurHans Kemp
 
Visuelereisdoororganisatielandv2 1225371301186079 8
Visuelereisdoororganisatielandv2 1225371301186079 8Visuelereisdoororganisatielandv2 1225371301186079 8
Visuelereisdoororganisatielandv2 1225371301186079 8roemen
 
IAD1 0809 Q3 Hoorcollege 2 Labels En Visuele Structuur
IAD1 0809 Q3 Hoorcollege 2   Labels En Visuele StructuurIAD1 0809 Q3 Hoorcollege 2   Labels En Visuele Structuur
IAD1 0809 Q3 Hoorcollege 2 Labels En Visuele StructuurHans Kemp
 
0708 Introductie user experience design minor
0708 Introductie user experience design minor0708 Introductie user experience design minor
0708 Introductie user experience design minorHans Kemp
 
Eerste Bijeenkomst Afstudeerders
Eerste Bijeenkomst AfstudeerdersEerste Bijeenkomst Afstudeerders
Eerste Bijeenkomst AfstudeerdersHans Kemp
 
Authentication means in electronic environments
Authentication means in electronic environmentsAuthentication means in electronic environments
Authentication means in electronic environmentsStevenSegaert
 
Multicultural services at Salpaus Further Education
Multicultural services at Salpaus Further EducationMulticultural services at Salpaus Further Education
Multicultural services at Salpaus Further EducationGeorge Bekiaridis
 
Keynote deeldag nijmegen_deelstad_2015
Keynote deeldag nijmegen_deelstad_2015Keynote deeldag nijmegen_deelstad_2015
Keynote deeldag nijmegen_deelstad_2015roemen
 
Ep 2012 week4-piaget_para-tarjetas
Ep 2012 week4-piaget_para-tarjetasEp 2012 week4-piaget_para-tarjetas
Ep 2012 week4-piaget_para-tarjetaslaurahe
 
Ep 2011 week3-development
Ep 2011 week3-developmentEp 2011 week3-development
Ep 2011 week3-developmentlaurahe
 
IBInnovation?coreytopf
IBInnovation?coreytopfIBInnovation?coreytopf
IBInnovation?coreytopfCorey Topf
 
Zappos - General Mills - 8-5-09
Zappos - General Mills - 8-5-09Zappos - General Mills - 8-5-09
Zappos - General Mills - 8-5-09zappos
 
Iad1 0809Q2 Hoorcollege 3 Beroepsproducten
Iad1 0809Q2 Hoorcollege 3   BeroepsproductenIad1 0809Q2 Hoorcollege 3   Beroepsproducten
Iad1 0809Q2 Hoorcollege 3 BeroepsproductenHans Kemp
 
Week 17 Sponges
Week 17 SpongesWeek 17 Sponges
Week 17 SpongesCorey Topf
 

Andere mochten auch (20)

Soc 02 Stross Justin
Soc 02 Stross JustinSoc 02 Stross Justin
Soc 02 Stross Justin
 
Iad1 Q2 Hoorcollege 2 Labels En Visuele Structuur
Iad1 Q2 Hoorcollege 2   Labels En Visuele StructuurIad1 Q2 Hoorcollege 2   Labels En Visuele Structuur
Iad1 Q2 Hoorcollege 2 Labels En Visuele Structuur
 
Visuelereisdoororganisatielandv2 1225371301186079 8
Visuelereisdoororganisatielandv2 1225371301186079 8Visuelereisdoororganisatielandv2 1225371301186079 8
Visuelereisdoororganisatielandv2 1225371301186079 8
 
IAD1 0809 Q3 Hoorcollege 2 Labels En Visuele Structuur
IAD1 0809 Q3 Hoorcollege 2   Labels En Visuele StructuurIAD1 0809 Q3 Hoorcollege 2   Labels En Visuele Structuur
IAD1 0809 Q3 Hoorcollege 2 Labels En Visuele Structuur
 
0708 Introductie user experience design minor
0708 Introductie user experience design minor0708 Introductie user experience design minor
0708 Introductie user experience design minor
 
Eerste Bijeenkomst Afstudeerders
Eerste Bijeenkomst AfstudeerdersEerste Bijeenkomst Afstudeerders
Eerste Bijeenkomst Afstudeerders
 
Authentication means in electronic environments
Authentication means in electronic environmentsAuthentication means in electronic environments
Authentication means in electronic environments
 
Ejemploc de caso
Ejemploc de casoEjemploc de caso
Ejemploc de caso
 
User Created Content deel I
User Created Content deel IUser Created Content deel I
User Created Content deel I
 
Multicultural services at Salpaus Further Education
Multicultural services at Salpaus Further EducationMulticultural services at Salpaus Further Education
Multicultural services at Salpaus Further Education
 
Kick Off
Kick OffKick Off
Kick Off
 
A1 olympics
A1 olympicsA1 olympics
A1 olympics
 
Unit 2
Unit 2Unit 2
Unit 2
 
Keynote deeldag nijmegen_deelstad_2015
Keynote deeldag nijmegen_deelstad_2015Keynote deeldag nijmegen_deelstad_2015
Keynote deeldag nijmegen_deelstad_2015
 
Ep 2012 week4-piaget_para-tarjetas
Ep 2012 week4-piaget_para-tarjetasEp 2012 week4-piaget_para-tarjetas
Ep 2012 week4-piaget_para-tarjetas
 
Ep 2011 week3-development
Ep 2011 week3-developmentEp 2011 week3-development
Ep 2011 week3-development
 
IBInnovation?coreytopf
IBInnovation?coreytopfIBInnovation?coreytopf
IBInnovation?coreytopf
 
Zappos - General Mills - 8-5-09
Zappos - General Mills - 8-5-09Zappos - General Mills - 8-5-09
Zappos - General Mills - 8-5-09
 
Iad1 0809Q2 Hoorcollege 3 Beroepsproducten
Iad1 0809Q2 Hoorcollege 3   BeroepsproductenIad1 0809Q2 Hoorcollege 3   Beroepsproducten
Iad1 0809Q2 Hoorcollege 3 Beroepsproducten
 
Week 17 Sponges
Week 17 SpongesWeek 17 Sponges
Week 17 Sponges
 

Ähnlich wie Managing Perl Installations: A SysAdmin's View

Linux Kernel Development
Linux Kernel DevelopmentLinux Kernel Development
Linux Kernel DevelopmentPriyank Kapadia
 
Building a linux kernel
Building a linux kernelBuilding a linux kernel
Building a linux kernelRaghu nath
 
Linux kernel driver tutorial vorlesung
Linux kernel driver tutorial vorlesungLinux kernel driver tutorial vorlesung
Linux kernel driver tutorial vorlesungdns -
 
How to make debian package from scratch (linux)
How to make debian package from scratch (linux)How to make debian package from scratch (linux)
How to make debian package from scratch (linux)Thierry Gayet
 
Automatic systems installations and change management wit FAI - Talk for Netw...
Automatic systems installations and change management wit FAI - Talk for Netw...Automatic systems installations and change management wit FAI - Talk for Netw...
Automatic systems installations and change management wit FAI - Talk for Netw...Henning Sprang
 
Approaching package manager
Approaching package managerApproaching package manager
Approaching package managerTimur Safin
 
Lecture 5 Kernel Development
Lecture 5 Kernel DevelopmentLecture 5 Kernel Development
Lecture 5 Kernel DevelopmentMohammed Farrag
 
Linux kernel modules
Linux kernel modulesLinux kernel modules
Linux kernel modulesHao-Ran Liu
 
Software management in linux
Software management in linuxSoftware management in linux
Software management in linuxnejadmand
 
Linux Kernel Programming
Linux Kernel ProgrammingLinux Kernel Programming
Linux Kernel ProgrammingNalin Sharma
 
Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014biicode
 

Ähnlich wie Managing Perl Installations: A SysAdmin's View (20)

Perl 20tips
Perl 20tipsPerl 20tips
Perl 20tips
 
Linux Kernel Development
Linux Kernel DevelopmentLinux Kernel Development
Linux Kernel Development
 
Perl Modules
Perl ModulesPerl Modules
Perl Modules
 
Building a linux kernel
Building a linux kernelBuilding a linux kernel
Building a linux kernel
 
Linux kernel driver tutorial vorlesung
Linux kernel driver tutorial vorlesungLinux kernel driver tutorial vorlesung
Linux kernel driver tutorial vorlesung
 
How to make debian package from scratch (linux)
How to make debian package from scratch (linux)How to make debian package from scratch (linux)
How to make debian package from scratch (linux)
 
Automatic systems installations and change management wit FAI - Talk for Netw...
Automatic systems installations and change management wit FAI - Talk for Netw...Automatic systems installations and change management wit FAI - Talk for Netw...
Automatic systems installations and change management wit FAI - Talk for Netw...
 
Approaching package manager
Approaching package managerApproaching package manager
Approaching package manager
 
Lecture 5 Kernel Development
Lecture 5 Kernel DevelopmentLecture 5 Kernel Development
Lecture 5 Kernel Development
 
Puppet quick start guide
Puppet quick start guidePuppet quick start guide
Puppet quick start guide
 
Linux kernel modules
Linux kernel modulesLinux kernel modules
Linux kernel modules
 
Perlbrew
PerlbrewPerlbrew
Perlbrew
 
Apache
ApacheApache
Apache
 
Apache
ApacheApache
Apache
 
Software management in linux
Software management in linuxSoftware management in linux
Software management in linux
 
Docker dDessi november 2015
Docker dDessi november 2015Docker dDessi november 2015
Docker dDessi november 2015
 
Linux Kernel Programming
Linux Kernel ProgrammingLinux Kernel Programming
Linux Kernel Programming
 
Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014
 
Plenv and carton
Plenv and cartonPlenv and carton
Plenv and carton
 
Node js Global Packages
Node js Global PackagesNode js Global Packages
Node js Global Packages
 

Mehr von Baden Hughes

Closing the Gap: Data Models for Documentary Linguistics
Closing the Gap: Data Models for Documentary LinguisticsClosing the Gap: Data Models for Documentary Linguistics
Closing the Gap: Data Models for Documentary LinguisticsBaden Hughes
 
If We're Not There Yet, How Far Do We Have To Go ? Web Metadata at The Univer...
If We're Not There Yet, How Far Do We Have To Go ? Web Metadata at The Univer...If We're Not There Yet, How Far Do We Have To Go ? Web Metadata at The Univer...
If We're Not There Yet, How Far Do We Have To Go ? Web Metadata at The Univer...Baden Hughes
 
Building Computational Grids with Apple’s Xgrid Middleware
Building Computational Grids with Apple’s Xgrid MiddlewareBuilding Computational Grids with Apple’s Xgrid Middleware
Building Computational Grids with Apple’s Xgrid MiddlewareBaden Hughes
 
Functional Requirements for an Interlinear Text Editor
Functional Requirements for an Interlinear Text EditorFunctional Requirements for an Interlinear Text Editor
Functional Requirements for an Interlinear Text EditorBaden Hughes
 
Management of Metadata in Linguistic Fieldwork: Experience from the ACLA Pro...
Management of Metadata in Linguistic Fieldwork: Experience from the ACLA Pro...Management of Metadata in Linguistic Fieldwork: Experience from the ACLA Pro...
Management of Metadata in Linguistic Fieldwork: Experience from the ACLA Pro...Baden Hughes
 
Disambiguating Advanced Computing for Humanities Researchers
Disambiguating Advanced Computing for Humanities ResearchersDisambiguating Advanced Computing for Humanities Researchers
Disambiguating Advanced Computing for Humanities ResearchersBaden Hughes
 
Metadata Quality Evaluation: Experience from the Open Language Archives Commu...
Metadata Quality Evaluation: Experience from the Open Language Archives Commu...Metadata Quality Evaluation: Experience from the Open Language Archives Commu...
Metadata Quality Evaluation: Experience from the Open Language Archives Commu...Baden Hughes
 
Encoding and Presenting Interlinear Text Using XML Technologies
Encoding and Presenting Interlinear Text Using XML TechnologiesEncoding and Presenting Interlinear Text Using XML Technologies
Encoding and Presenting Interlinear Text Using XML TechnologiesBaden Hughes
 
Refactoring Metadata:
Refactoring Metadata:Refactoring Metadata:
Refactoring Metadata:Baden Hughes
 
Towards a Web Search Service for Minority Language Communities
Towards a Web Search Service for Minority Language CommunitiesTowards a Web Search Service for Minority Language Communities
Towards a Web Search Service for Minority Language CommunitiesBaden Hughes
 
Change Management and Versioning in Ontologies
Change Management and Versioning in OntologiesChange Management and Versioning in Ontologies
Change Management and Versioning in OntologiesBaden Hughes
 
Object Reuse and Exchange (ORE) : Experience in the Open Language Archives Co...
Object Reuse and Exchange (ORE) : Experience in the Open Language Archives Co...Object Reuse and Exchange (ORE) : Experience in the Open Language Archives Co...
Object Reuse and Exchange (ORE) : Experience in the Open Language Archives Co...Baden Hughes
 
The Effects of Cross-Pollination : How non-library mass market services are c...
The Effects of Cross-Pollination : How non-library mass market services are c...The Effects of Cross-Pollination : How non-library mass market services are c...
The Effects of Cross-Pollination : How non-library mass market services are c...Baden Hughes
 
Why Digitization Increases the Value of Print Collections
Why Digitization Increases the Value of Print CollectionsWhy Digitization Increases the Value of Print Collections
Why Digitization Increases the Value of Print CollectionsBaden Hughes
 

Mehr von Baden Hughes (14)

Closing the Gap: Data Models for Documentary Linguistics
Closing the Gap: Data Models for Documentary LinguisticsClosing the Gap: Data Models for Documentary Linguistics
Closing the Gap: Data Models for Documentary Linguistics
 
If We're Not There Yet, How Far Do We Have To Go ? Web Metadata at The Univer...
If We're Not There Yet, How Far Do We Have To Go ? Web Metadata at The Univer...If We're Not There Yet, How Far Do We Have To Go ? Web Metadata at The Univer...
If We're Not There Yet, How Far Do We Have To Go ? Web Metadata at The Univer...
 
Building Computational Grids with Apple’s Xgrid Middleware
Building Computational Grids with Apple’s Xgrid MiddlewareBuilding Computational Grids with Apple’s Xgrid Middleware
Building Computational Grids with Apple’s Xgrid Middleware
 
Functional Requirements for an Interlinear Text Editor
Functional Requirements for an Interlinear Text EditorFunctional Requirements for an Interlinear Text Editor
Functional Requirements for an Interlinear Text Editor
 
Management of Metadata in Linguistic Fieldwork: Experience from the ACLA Pro...
Management of Metadata in Linguistic Fieldwork: Experience from the ACLA Pro...Management of Metadata in Linguistic Fieldwork: Experience from the ACLA Pro...
Management of Metadata in Linguistic Fieldwork: Experience from the ACLA Pro...
 
Disambiguating Advanced Computing for Humanities Researchers
Disambiguating Advanced Computing for Humanities ResearchersDisambiguating Advanced Computing for Humanities Researchers
Disambiguating Advanced Computing for Humanities Researchers
 
Metadata Quality Evaluation: Experience from the Open Language Archives Commu...
Metadata Quality Evaluation: Experience from the Open Language Archives Commu...Metadata Quality Evaluation: Experience from the Open Language Archives Commu...
Metadata Quality Evaluation: Experience from the Open Language Archives Commu...
 
Encoding and Presenting Interlinear Text Using XML Technologies
Encoding and Presenting Interlinear Text Using XML TechnologiesEncoding and Presenting Interlinear Text Using XML Technologies
Encoding and Presenting Interlinear Text Using XML Technologies
 
Refactoring Metadata:
Refactoring Metadata:Refactoring Metadata:
Refactoring Metadata:
 
Towards a Web Search Service for Minority Language Communities
Towards a Web Search Service for Minority Language CommunitiesTowards a Web Search Service for Minority Language Communities
Towards a Web Search Service for Minority Language Communities
 
Change Management and Versioning in Ontologies
Change Management and Versioning in OntologiesChange Management and Versioning in Ontologies
Change Management and Versioning in Ontologies
 
Object Reuse and Exchange (ORE) : Experience in the Open Language Archives Co...
Object Reuse and Exchange (ORE) : Experience in the Open Language Archives Co...Object Reuse and Exchange (ORE) : Experience in the Open Language Archives Co...
Object Reuse and Exchange (ORE) : Experience in the Open Language Archives Co...
 
The Effects of Cross-Pollination : How non-library mass market services are c...
The Effects of Cross-Pollination : How non-library mass market services are c...The Effects of Cross-Pollination : How non-library mass market services are c...
The Effects of Cross-Pollination : How non-library mass market services are c...
 
Why Digitization Increases the Value of Print Collections
Why Digitization Increases the Value of Print CollectionsWhy Digitization Increases the Value of Print Collections
Why Digitization Increases the Value of Print Collections
 

Kürzlich hochgeladen

Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 

Kürzlich hochgeladen (20)

Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 

Managing Perl Installations: A SysAdmin's View

  • 1. Managing Perl Installations: A SysAdmin’s View 1,2,3 Baden Hughes Department of Computer Science and Software Engineering The University of Melbourne badenh@csse.unimelb.edu.au 1
  • 2. What the title really means … Managing Perl Installations: A SysAdmin’s View 1 Useful things a SysAdmin should know about Perl Managing Perl Installations: A SysAdmin’s View 2 What you can do if you actually RTFM Managing Perl Installations: A SysAdmin’s View 3 5327 other things you can do with CPAN 2
  • 3. Overview Perl, Modules, CPAN Problems and Objectives The Sharp and Pointy Bits Module Management Bundles Working within User-space Conclusion 3
  • 4. Perl http://www.perl.org Perl is a dynamic procedural programming language Designed by Larry Wall, maintained as open source project First released in 1987 Perl borrows features from C, shell scripting (sh), awk, sed, Lisp, and (to a lesser extent) many other programming languages. Ubiquitous 4
  • 5. Perl Modules A Perl module is a discrete component of software for the Perl programming language. Modules distinguished by a unique namespace, e.g. quot;CGIquot; or quot;Net::FTPquot; or quot;XML::Parserquot;. Convention of one module per file with a *.pm extension. Collection of one or more modules, with accompanying documentation (yes, really) and build scripts, compose a package. 5
  • 6. CPAN Comprehensive Perl Archive Network http://cpan.org A large collection of Perl software (modules, packages and scripts) and associated documentation A Perl module (CPAN.pm) perl –MCPAN –e shell Used to download and install Perl software from the CPAN archive 6
  • 7. Scoping the Problem On multi-user systems, particularly where there are Perl-oriented developers of some flavour, being responsible for Perl can be quite onerous The defaults for maintaining Perl on a shared system are typically Every user compiles and runs their own version of Perl Constant trickle of requests for Perl and/or module upgrades and/or additions Naturally neither of these are considered desirable by typical sysadmins since they have both system resource and human effort constraints 7
  • 8. Objectives Get smarter: Perl itself can make managing a Perl installation on a shared system much easier Objectives Demonstrate ways to manage Perl installations based on commonly occurring tasks Show ‘core Perl’ methods that work everywhere, not distribution specific methods which only work on one platform Get users to help you, rather than the other way around 8
  • 9. Modules Which modules are on my system ? Installing modules Removing modules 9
  • 10. Q: Which modules are on my system ? A: perldoc perllocal perldoc perllocal will identify a list of modules, their version, location etc. Tue Oct 4 17:00:07 2005: quot;Modulequot; Geo::GNIS * quot;installed into: /usr/lib/perl5/site_perl/5.8.5quot; * quot;LINKTYPE: dynamicquot; * quot;VERSION: 0.01quot; * quot;EXE_FILES: quot; 10
  • 11. Q: Which modules are on my system ? A: ExtUtils::Installed Use the ExtUtils::Installed module #!/usr/local/bin/perl use ExtUtils::Installed; my $instmod = ExtUtils::Installed->new(); foreach my $module ($instmod->modules()) { my $version = $instmod->version($module) || quot;???quot;; print quot;$module -- $versionnquot;; } produces a list of modules and their version(s) ExtUtils::Installed is in the standard Perl installation, and uses the installation generated files for modules to determine status 11
  • 12. Q: Which modules are on my system ? A: pmtools The pmtools suite to help navigate and manage Perl module installations Obtain them at http://language.perl.com/misc/pmtools- 1.00.tar.gz. pmtools -- a suite of small programs to help manage modules pmpath - show the module' full path s pmvers - get a module version number pmdesc - get a module description pmall - get all installed modules pmdesc descriptions pminst - find what' installed s 12
  • 13. Installing Modules With CPAN.pm, installing a new module is trivial: perl -MCPAN -e 'install Esoteric::Module’ Finding which modules exist and their versions can also be done directly via CPAN cpan > i $KEYWORD 13
  • 14. Removing Modules (1) By using the ExtUtils::Installed and ExtUtils::Packlist modules that come with Perl #!/usr/local/bin/perl -w use ExtUtils::Packlist; use ExtUtils::Installed; $ARGV[0] or die quot;Usage: $0 Module::Namenquot;; my $mod = $ARGV[0]; my $inst = ExtUtils::Installed->new(); foreach my $item (sort($inst->files($mod))) { print quot;removing $itemnquot;; unlink $item; } my $packfile = $inst->packlist($mod)->packlist_file(); print quot;removing $packfilenquot;; unlink $packfile; 14
  • 15. Removing Modules (2) PPM can uninstall modules shell>ppm remove $MODULE-NAME CPAN.pm doesn’t have a ‘remove’ option 15
  • 16. Bundles What is a Bundle ? Which Bundles exist ? Making Bundles (single point of Perl administration for multiple systems) 16
  • 17. Q: What is a Bundle ? A bundle is quot;A group of related modules on CPAN (or some repository“ A bundle can be any collection of modules, related or not. Bundles are used by CPAN.pm to install a group of modules quickly and easily. A bundle is essentially a module in the Bundle:: namespace that has all the look and feel of a module but really isn'since it contains no code instead having a t manifest of modules to be installed. There are a number of existing module bundles that you can view as examples to help in building your own. 17
  • 18. Q: Which Bundles already exist ? You can get a list of bundle distributions on search.cpan.org and CPAN.pm also lists all currently available bundles when you type ' at the prompt. b' cpan> b Bundle Bundle::ABH (A/AB/ABH/Bundle-ABH-1.04.tar.gz) Bundle Bundle::AO::Base (I/IX/IX/AO-0.32.tar.gz) Bundle Bundle::AO::Standard (I/IX/IX/AO-0.32.tar.gz) Bundle Bundle::Apache (D/DO/DOUGM/mod_perl-1.25.tar.gz) Bundle Bundle::Apache::ASP (C/CH/CHAMAS/Apache-ASP-2.09.tar.gz) Bundle If you give ' a module argument it will list extended information about the bundle b' itself. cpan> b Bundle::DBI Bundle id = Bundle::DBI CPAN_USERID TIMB (Tim Bunce <Tim.Bunce@pobox.com>) CPAN_VERSION 1.03 CPAN_FILE T/TI/TIMB/DBI-1.15.tar.gz MANPAGE Bundle::DBI - A bundle to install DBI and required modules. CONTAINS Storable Net::Daemon RPC::PlServer Getopt::Long DBI INST_FILE /usr/local/lib/perl5/site_perl/5.005/sun4- solaris/Bundle/DBI.pm INST_VERSION 1.03 18
  • 19. Q: How can I make a Bundle ? Use the autobundle feature of CPAN.pm autobundle will, if no arguments are given, inventory all modules installed on the system and make a systemwide bundle. If you only want a few modules in the bundle you can simply give it a list of modules and it will do the rest. user@host /home/user/> perl -MCPAN -eshell cpan> autobundle CGI Crypt::Rot13 Date::Christmas Date::Manip By default bundles are named quot;Snapshot_YYYY_MM_DD_HH_MM_SS.pmquot; The resultant file may then be used with the CPAN.pm perl -MCPAN -e 'install Bundle::Snapshot_2006_04_09_10_36_24.pm' 19
  • 20. Bundles and System Administration Bundles are a very convenient way to maintain homogeneous installations across multiple systems, including across architectures Personal experience: create bundles for local and external modules; store bundles in a repository; checkout and install sequentially on development, test and production servers; single install experience, guaranteed homogeneity 20
  • 21. User-space Perl Alternative locations for Modules Standard Perl plus Custom Modules User-specific CPAN 21
  • 22. Working with Perl in User Space Advanced users often want more control over their Perl installation on shared systems SysAdmins are reluctant to let users “do as they see fit” to system wide utilities CPAN requires elevated privileges Fortunately Perl offers several ways around this problem 22
  • 23. Installing Perl Modules in Alternative Locations Any manually installed Perl module can be trivially installed in an alternative location, eg within ~/ Set PREFIX and LIB when you run the Makefile.PL to install LIB is where the module files will go PREFIX is the stub directory for everything else user@host$ perl Makefile.PL LIB=/home/user/lib PREFIX=/home/user/lib The reason this works is because Perl has a standard way of installing modules, called MakeMaker 23
  • 24. Standard Perl + Custom Modules Sometimes however, a user simply wants to install a few modules but use the standard system wide Perl installation In this case, setting the PERL5LIB environment variable can allow the inclusion of modules installed in non-standard locations PERL5LIB=${PERL5LIB:+$PERL5LIB:}$HOME/lib/perl5 24
  • 25. User-space CPAN CPAN can be configured differently for each user, and can install modules to custom locations on a system, eg ~/lib/perl5 and ~/share/man MyConfig.pm is a base module for precisely this purpose, and can be used in place of a standard CPAN.pm Allows users to directly use CPAN functionality, with no run time environment variables required 25
  • 26. Conclusion Perl is ubiquitous On shared systems, Perl has native tools to reduce the administrative overhead Users can be empowered to maintain their own Perl infrastructure without significant effort RTFM’ing can actually be beneficial 26