How To Install Sabre Print Module

Posted onby
Active1 year, 9 months ago
  1. Sabre Java Print Module
  2. How To Install Sabre Print Module 3

How do you find the version of an installed Perl module?

Use the following steps to configure the Sabre Printing Module: E Enter the Sabre Address of the device in the Sabre Address box. Choose the appropriate COM Port, then Next. The COM Port screen will display. The Complete screen will display. Shut down the program and restart SPM for changes to take effect. Sabre Travel Network. UserId (number that follows SI*) Password PCC Sign In Forgot password?

This is in an answer down at the bottom, but I figure it important enough to live up here. With these suggestions, I create a function in my .bashrc

Drew Stephens
Drew StephensDrew Stephens
9,5699 gold badges47 silver badges79 bronze badges

12 Answers

Why are you trying to get the version of the module? Do you need this from within a program, do you just need the number to pass to another operation, or are you just trying to find out what you have?

I have this built into the cpan (which comes with perl) with the -D switch so you can see the version that you have installed and the current version on CPAN:

If you want to see all of the out-of-date modules, use the -O (capital O) switch:

If you want to see this for all modules you have installed, try the -a switch to create an autobundle.

brian d foybrian d foy
104k30 gold badges177 silver badges484 bronze badges

Most modules (especially ones from The CPAN) have a $VERSION variable:

zigdonzigdon
12k5 gold badges30 silver badges54 bronze badges

VERSION is a UNIVERSAL method of all Perl classes. You can use it to get the module version (if it has been set which it usually has).

Here is a one liner where you only have to add the module name once:

jmcnamarajmcnamara
21.7k3 gold badges48 silver badges65 bronze badges

There is a less-typing trick, that works provided your module doesn't have something insane like a Unix timestamp as a version number.

This works because what it translates to is

How

i.e. a version of Foo::Bar that's at least version 9999 or newer.And what you get is

(Neat trick I learned from Matt Trout.)

PenfoldPenfold

If you are lucky, the module will have a package variable named $VERSION:

This is needed for modules to be distributed on CPAN, but internally developed modules might follow a different convention or none at all.

Jon EricsonJon Ericson
15.7k11 gold badges87 silver badges134 bronze badges

Thanks for the answers! I've created a function in my .bashrc to easily find the version of a Perl module:

Drew StephensDrew Stephens
9,5699 gold badges47 silver badges79 bronze badges

Check out the pmtools scripts on CPAN. If you're using a Debian(-based) distro, there's also a handy pmtools package. This includes a script 'pmvers' that tells you a module's version. It's quite handy.

It does something similar to the various one-liners folks posted, but it's a bit smarter about error handling, and can give you the version of more than one module at once.

Onlyjob
4,2261 gold badge28 silver badges31 bronze badges
Dave RolskyDave Rolsky
4,3141 gold badge19 silver badges24 bronze badges

I wrote a small script to report that: perlver.

Sabre Java Print Module

This is a simple little tool that tells you what version of a module you have installed, and where the .pm file is located. It also ensures the module can be loaded successfully. It automatically converts ‘-’, ‘/’, or ‘’ to ‘::’, so you can use a pathname or distribution name instead of the canonical module name.

It assumes that the module defines a $VERSION. If the module doesn't define a $VERSION, it will still tell you where the .pm file is, so you can examine it manually. You can also check several modules at once:

cjmcjm
57k8 gold badges115 silver badges161 bronze badges

Easiest to remember and most robust version for me:

JpsyJpsy
12.9k3 gold badges75 silver badges88 bronze badges

In addition, for modules that use Exporter.pm, you can get this information with this trick:

For modules that don't use Exporter.pm, a slightly longer trick reports the same information:

tyetye

We have the system perl (/usr/bin/perl) in Solaris 10, and above solutions are useless. Some of them report 'module.pm is not installed', some of them have no output.

Here is the code which is helpful, which can list all modules and their version.

BMWBMW

How To Install Sabre Print Module 3

25.5k5 gold badges61 silver badges78 bronze badges
smonffsmonff
2,4771 gold badge29 silver badges42 bronze badges

Not the answer you're looking for? Browse other questions tagged perlmoduleversioncpan or ask your own question.