Operating System - OpenVMS
1828584 Members
2834 Online
109982 Solutions
New Discussion

Perl V5.8.6, CPAN, modules etc....

 
SOLVED
Go to solution
Robert_Boyd
Respected Contributor

Perl V5.8.6, CPAN, modules etc....

Does CPAN work with this release of perl on VMS? If so, how do I configure it? I tried and apparently made a mess of it and need some pointers about how to back out of it.

How do I go about finding documentation on available modules/scripts for dealing with lists and hashes?

Just so you'll have some idea of what I'm doing: I'm wanting to build up a table of some information about network ports on all of the systems I'm running and compare the console settings, lancp settings, active values, and required values. I've figured out all the LANCP commands and such to generate the input to this beast. Now I'm sorting out methods to deal with it and it's been too long since I wrote anything of any sophistication in perl and I've gotten rusty.

Thanks in advance for any pointers.

Robert
Master you were right about 1 thing -- the negotiations were SHORT!
8 REPLIES 8
Robert Atkinson
Respected Contributor

Re: Perl V5.8.6, CPAN, modules etc....

Robert, not sure if that version is supported, but if you don't get any luck here try the VMS Perl email group - http://www.sidhe.org/vmsperl/vmsperlfaq.html#Q13

It's quite active, and run by Craig Berry.

Rob.
Robert Atkinson
Respected Contributor

Re: Perl V5.8.6, CPAN, modules etc....

Following on from that, I've been looking through old emails, and they've been working on 5.8.6 since last year, and are now on 5.8.8.

Rob.
Robert_Boyd
Respected Contributor

Re: Perl V5.8.6, CPAN, modules etc....

Robert,

Thanks for the pointer to the webpage.

It appears that getting on the VMSPERL email list is not working as advertised on the webpage you linked to.

Robert
Master you were right about 1 thing -- the negotiations were SHORT!
Robert Atkinson
Respected Contributor

Re: Perl V5.8.6, CPAN, modules etc....

Try emailing Craig :-

craigberry-at-mac-dot-com

Rob.
Craig A Berry
Honored Contributor
Solution

Re: Perl V5.8.6, CPAN, modules etc....

Robert found me, and I've replied. For the sake of others who may be interested, the way to subscribe to the vmsperl mailing list is to send any old message to vmsperl-subscribe AT perl DOT org. You'll get a confirmation message with instructions. The list archives are available here:

http://www.nntp.perl.org/group/perl.vmsperl

among other places.

The web pages at http://www.sidhe.org/vmsperl are woefully out of date. As of a few days ago, the owner of the site granted me access and I'll be doing some updates soonish, I hope.

The CPAN module is in need of porting work to function on VMS. I have not looked deeply into it so I don't know exactly what needs to be done. Installing extensions one-at-a-time can get to be a pain when there are numerous dependencies, but it does work.

Perl includes array and hash data types for "dealing with lists and hashes," and I'm not sure what exactly Robert needs beyond that.

But I'll take a wild guess and assume there is a desire to add persistence of some kind to Perl data structures. Hashes can be tied to permanent storage in a number of different ways. The Tie::File extension included in the core in recent versions of Perl ties the members of a hash to lines in a flat text file. The VMS::IndexedFile extension uses RMS-specific goodness to turn hash lookups into indexed reads. The DBI and related DBD extensions provide relational database access.

Note that there are VMS::System, VMS::Queue, VMS::Device, and VMS::User extensions available providing Perlish access to $GETSYI, $GETQUI, $GETDVI, and $GETJPI respectively. If you know what system service or lexical function calls would give you the settings you need, there may well be a Perl equivalent that would avoid spawning LANCP commands and parsing the output.

Hope this gets you started.
Robert_Boyd
Respected Contributor

Re: Perl V5.8.6, CPAN, modules etc....

Thanks Craig.

As far as I know, the only way to get the data I need is through LANCP. What I need are the values stored in the LANCP database and the console settings. The only way I know to get the console settings for the Ethernet interfaces is through the undocumented LANCP SHOW DEVICE/INTERNAL command(as told to me by HP Support).

There may be calls to $GETDVI that will get me the values for what is active on the system, but not the values that were used to set things when the system was booting up.

One area that I'm looking for specific help with is manipulating hashes of lists/arrays.
I already have the critter constructed successfully, but am fishing about for the easiest way to manipulate pieces of it.
Any pointers to examples of manipulating hashes of arrays would be deeply appreciated.

Thanks,
Robert
Master you were right about 1 thing -- the negotiations were SHORT!
Craig A Berry
Honored Contributor

Re: Perl V5.8.6, CPAN, modules etc....

What you really need is chapter 9 of the O'Reilly book Programming Perl:

http://www.oreilly.com/catalog/pperl3/

but if you type "hashes of arrays" into Google you'll also find some things that may help.
Robert_Boyd
Respected Contributor

Re: Perl V5.8.6, CPAN, modules etc....

Craig,

Thanks for the pointers -- unfortunately chapter 9 in the Perl book is a bit sparse on the actual use of such critters. I've succeeded in making my code work as of now.

I found some interesting references by Googling various combinations of things like "manipulating hashes of arrays in perl"

I'm now digging into creating a recursive subroutine to replace an ugly loop.

It looks like I've managed to hack my way out of the woods and into the rough. I may even be close to the green. :-)

Thanks,

Robert
Master you were right about 1 thing -- the negotiations were SHORT!