niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
·  nixdoc.net ·  man pages ·  Linux HOWTOs ·  FreeBSD Tips ·  Forums
navigation Forum index » Not Unix » VMS » vmsperl
Perl programming question
Post new topic   Reply to topic Page 1 of 1 [11 Posts] View previous topic :: View next topic
Author Message
Mark Berryman
*nix forums addict


Joined: 04 Aug 2005
Posts: 50

PostPosted: Fri Jul 14, 2006 6:03 pm    Post subject: Perl programming question Reply with quote

I have been tasked with converting all of the network utilities I've written
over the years in MUMPS into a language likely to be known by more people.
Most of it will be converted to Perl. So far the conversion hasn't presented
to many difficulties but there is one construct for which I have not been able
to derive a close equivalent. To wit:

MUMPS arrays use alphanumeric indicies with a defined collating order. Numeric
subscripts collate first, in numeric order, followed by string subscripts in
ASCII order. Thus, an array with the following indicies would collate in this
order: -2,-1,0,1,2,9,100,101.5,A,E,H,a,c,z etc. MUMPS arrays are also sparse
arrays and are multidimensional. However, for this question, it is okay to
assume an array with only one dimension.

The MUMPS language provides a function, called $ORDER, which takes an argument
and returns the next index that exists in the array that would come after the
supplied argument (a 2nd argument can be used to cause the function to return
the previous index instead of the next index). For example, given an array
with the index values given above, if I asked for the next index after 0, I
would get 1; the next index after 50 would return 100; the next index after "Z"
would return "a"; etc.

My question: is there any way to approach similar functionality in Perl? Any
non-numeric arrays in my code are being converted to Perl hashes. I can
retrieve the value of a specific key, and I can use a for loop to go through
every key/value pair but, is there any way of doing something similar to $ORDER
without have to scan the entire hash? Also, is there any defined order in
which a hash is stored?

Thanks for any help any of you can provide.

Mark Berryman
Back to top
Alan Winston - SSRL Centr
*nix forums Guru Wannabe


Joined: 03 Aug 2005
Posts: 118

PostPosted: Fri Jul 14, 2006 6:20 pm    Post subject: Re: Perl programming question Reply with quote

Mark Berryman wrote:

Quote:
I have been tasked with converting all of the network utilities I've written
over the years in MUMPS into a language likely to be known by more people.
Most of it will be converted to Perl. So far the conversion hasn't presented
to many difficulties but there is one construct for which I have not been able
to derive a close equivalent. To wit:

MUMPS arrays use alphanumeric indicies with a defined collating order. Numeric
subscripts collate first, in numeric order, followed by string subscripts in
ASCII order. Thus, an array with the following indicies would collate in this
order: -2,-1,0,1,2,9,100,101.5,A,E,H,a,c,z etc. MUMPS arrays are also sparse
arrays and are multidimensional. However, for this question, it is okay to
assume an array with only one dimension.

The MUMPS language provides a function, called $ORDER, which takes an argument
and returns the next index that exists in the array that would come after the
supplied argument (a 2nd argument can be used to cause the function to return
the previous index instead of the next index). For example, given an array
with the index values given above, if I asked for the next index after 0, I
would get 1; the next index after 50 would return 100; the next index after "Z"
would return "a"; etc.

My question: is there any way to approach similar functionality in Perl? Any
non-numeric arrays in my code are being converted to Perl hashes. I can
retrieve the value of a specific key, and I can use a for loop to go through
every key/value pair but, is there any way of doing something similar to
$ORDER without have to scan the entire hash?

I think *somebody* has to scan the whole hash sometime, but it doesn't have to
be explicitly in your code.


Somebody who knows something should respond to this, really, but a WAG at how
to do this, if your hash is static once set up:

my $ordinal, $index, %ordinalhash, %indexhash;

$ordinal = 0;
foreach $index (sort keys %yourhash) {
$ordinal++;
$ordinalhash{$ordinal} = $index;
$indexhash($index) = $ordinal;
}


To get your "what is the next index after this index", you can do


$next_index = $ordinal_hash{$indexhash{$this_index}+1};

and for the previous index

$previous_index = $ordinal_hash{$indexhash{$this_index}-1};


(In principle, although you have to check your values for undefinedness.)

[It seems inelegant to subvert what's basically an array lookup into _two_
hashes, but I can't right this second think of an array way to do it that
doesn't involve your coding a binary search or something to find your index,
while this lets Perl's highly optimized hash search code do that for you. But
in any case, there's more than one way to do it.]


Quote:
Also, is there any defined order in which a hash is stored?

I probably ought to know that. I _suspect_ it's just stored in the order
you inserted stuff into it. I really don't know how much garbage collection
goes on during runtime.

-- Alan



--
===============================================================================
Alan Winston --- WINSTON@SSRL.SLAC.STANFORD.EDU
Disclaimer: I speak only for myself, not SLAC or SSRL Phone: 650/926-3056
Paper mail to: SSRL -- SLAC BIN 99, 2575 Sand Hill Rd, Menlo Park CA 94025
===============================================================================
Back to top
Craig A. Berry
*nix forums Guru Wannabe


Joined: 27 May 2005
Posts: 143

PostPosted: Fri Jul 14, 2006 6:45 pm    Post subject: Re: Perl programming question Reply with quote

At 10:54 AM -0800 7/14/06, Mark.Berryman@Mvb.Saic.Com wrote:
Quote:
I have been tasked with converting all of the network utilities I've written
over the years in MUMPS into a language likely to be known by more people.
Most of it will be converted to Perl. So far the conversion hasn't presented
to many difficulties but there is one construct for which I have not been able
to derive a close equivalent. To wit:

MUMPS arrays use alphanumeric indicies with a defined collating order. Numeric
subscripts collate first, in numeric order, followed by string subscripts in
ASCII order. Thus, an array with the following indicies would collate in this
order: -2,-1,0,1,2,9,100,101.5,A,E,H,a,c,z etc. MUMPS arrays are also sparse
arrays and are multidimensional. However, for this question, it is okay to
assume an array with only one dimension.

The MUMPS language provides a function, called $ORDER, which takes an argument
and returns the next index that exists in the array that would come after the
supplied argument (a 2nd argument can be used to cause the function to return
the previous index instead of the next index). For example, given an array
with the index values given above, if I asked for the next index after 0, I
would get 1; the next index after 50 would return 100; the next index after "Z"
would return "a"; etc.

My question: is there any way to approach similar functionality in Perl? Any
non-numeric arrays in my code are being converted to Perl hashes. I can
retrieve the value of a specific key, and I can use a for loop to go through
every key/value pair but, is there any way of doing something similar to $ORDER
without have to scan the entire hash? Also, is there any defined order in
which a hash is stored?

No, I don't think you can depend on the order of hash storage, though
there are various ordered hash modules available. You might try a a
tied hash implemented via a lookaside hash that keeps track of the next
and previous keys for each key in the primary hash.

Have you looked at the MUMPS to Perl translator at:

http://search.cpan.org/~smueller/Language-Mumps-1.07/Mumps.pm

Even if the code it generates is not something you want to use, you
might get ideas for how to do things.

Whatever you do, I would recommend borrowing from what's out there,
and there is a lot of it. Go to <http://search.cpan.org> and try
some likely searches such as "sparse" or "ordered hash."
--
________________________________________
Craig A. Berry
mailto:craigberry@mac.com

"... getting out of a sonnet is much more
difficult than getting in."
Brad Leithauser
Back to top
Michael G Schwern
*nix forums beginner


Joined: 08 Jul 2005
Posts: 27

PostPosted: Fri Jul 14, 2006 8:05 pm    Post subject: Re: Perl programming question Reply with quote

On 7/14/06, Mark.Berryman@mvb.saic.com <Mark.Berryman@mvb.saic.com> wrote:
Quote:
The MUMPS language provides a function, called $ORDER, which takes an argument
and returns the next index that exists in the array that would come after the
supplied argument (a 2nd argument can be used to cause the function to return
the previous index instead of the next index). For example, given an array
with the index values given above, if I asked for the next index after 0, I
would get 1; the next index after 50 would return 100; the next index after "Z"
would return "a"; etc.

My question: is there any way to approach similar functionality in Perl? Any
non-numeric arrays in my code are being converted to Perl hashes. I can
retrieve the value of a specific key, and I can use a for loop to go through
every key/value pair but, is there any way of doing something similar to $ORDER
without have to scan the entire hash?

There's no native structure which matches what you need. Hashes are
really close except for the $ORDER thing.

If the hashes tend to be small (say, less than 10,000 keys) or order()
isn't called very often then I'd just go with just implementing
order() using sort. Its surprisingly efficient. Its written in
highly optimized C while anything you write will be written in
not-so-optimized Perl. And its cheap, programming time wise.

sub _mumps_cmp { ...this exercise is left to the reader... }

sub order {
my($hash, $given_key) = @_;

my $next_key;
for my $key (sort _mumps_cmp keys %$hash) {
if( _mumps_cmp($given_key, $key) == -1 ) {
$next_key = $key;
last;
}
}

return $next_key;
}

To most closely match the existing interface you'd create a tied hash
which kept its keys sorted. If you implemented this using a search
tree rather than a linear sort it can be efficient, in the big O
sense. Then order() is just a matter of walking the tree to the right
until you come upon a node greater than your given key. Then you
return the key of the next node on the right. O(logn) while the sort
solution is O(n logn). But this doesn't take into account the
constant.

Unless your hashes are large, say more than 10,000 keys, this is going
to be hideously inefficient in the C (constant) sense. And a simple
tied hash is 10 times slower than a regular hash simply due to method
call and tying overhead. If you used a straight object rather than a
tie it goes down to 3 times slower.

So I'd go with just using a hash and implementing order() with sort.
That gets things working quickly, cheaply and most reliably. Don't do
anything more complicated until you've done some profiling.


Quote:
Also, is there any defined order in
which a hash is stored?

No. As a matter of fact 5.8.1 made it specificly randomize on each new process.
Back to top
Craig A. Berry
*nix forums Guru Wannabe


Joined: 27 May 2005
Posts: 143

PostPosted: Sat Jul 15, 2006 4:32 pm    Post subject: hash order (was Re: Perl programming question) Reply with quote

At 11:20 AM -0700 7/14/06, Alan Winston - SSRL Central Computing wrote:
Quote:
Mark Berryman wrote:

Also, is there any defined order in which a hash is stored?

I probably ought to know that. I _suspect_ it's just stored in the order
you inserted stuff into it. I really don't know how much garbage collection
goes on during runtime.

Do the following search in your POD directory and you will see that
the order is randomized for algorithmic and security reasons and it
has changed several times during the Perl 5 era:

$ sea *.pod hash,order/match=and

However, one of the FAQs has an entry called "How do I make my hash
remember the order I put elements into it?":

http://faq.perl.org/perlfaq4.html#How_can_I_make_my_ha



--
________________________________________
Craig A. Berry
mailto:craigberry@mac.com

"... getting out of a sonnet is much more
difficult than getting in."
Brad Leithauser
Back to top
Michael G Schwern
*nix forums beginner


Joined: 08 Jul 2005
Posts: 27

PostPosted: Sat Jul 15, 2006 11:07 pm    Post subject: Re: Perl programming question Reply with quote

On 7/14/06, Alan Winston - SSRL Central Computing
<winston@slac.stanford.edu> wrote:
Quote:
Somebody who knows something should respond to this, really, but a WAG at how
to do this, if your hash is static once set up:

my $ordinal, $index, %ordinalhash, %indexhash;

$ordinal = 0;
foreach $index (sort keys %yourhash) {
$ordinal++;
$ordinalhash{$ordinal} = $index;
$indexhash($index) = $ordinal;
}


To get your "what is the next index after this index", you can do


$next_index = $ordinal_hash{$indexhash{$this_index}+1};

and for the previous index

$previous_index = $ordinal_hash{$indexhash{$this_index}-1};

There's already a couple modules on CPAN for this, Tie::Hash::Sorted
and Tie::SortHash do internally. They likely do some variation of
your algorithm.
However, as they are tied, hash performance will be a smoking ruin.
Back to top
Michael G Schwern
*nix forums beginner


Joined: 08 Jul 2005
Posts: 27

PostPosted: Sat Jul 15, 2006 11:12 pm    Post subject: Re: Perl programming question Reply with quote

On 7/14/06, Mark.Berryman@mvb.saic.com <Mark.Berryman@mvb.saic.com> wrote:
Quote:
MUMPS arrays use alphanumeric indicies with a defined collating order. Numeric
subscripts collate first, in numeric order, followed by string subscripts in
ASCII order. Thus, an array with the following indicies would collate in this
order: -2,-1,0,1,2,9,100,101.5,A,E,H,a,c,z etc. MUMPS arrays are also sparse
arrays and are multidimensional. However, for this question, it is okay to
assume an array with only one dimension.

Out of curiousity I looked up MUMPS and found that the sparse arays
you described are modeled as B-Trees, which makes sense.

The BerkeleyDB module provides access to BerkeleyDB's B-Tree
structure. I believe by setting up a cursor and using
$cursor->c_get($key, undef, DB_SET_RANGE) you get behavior very much
like $ORDER.

I have no idea what the performance will be like, but it is probably
the closest thing to your real MUMPS data structure you're likely to
get.
http://search.cpan.org/~pmqs/BerkeleyDB-0.29/

PS It would be helpful to know how $ORDER is being used and how
often. It may be that its use can be replaced with something more
Perlish than trying to wedge $ORDER into Perl.
Back to top
Robert L Boyd
*nix forums beginner


Joined: 17 Jul 2006
Posts: 5

PostPosted: Mon Jul 17, 2006 11:52 pm    Post subject: RE: Perl programming question Reply with quote

I'm trying to add some modules to my Perl setup on VMS 7.3-2.

I am finding the process of reading the instructions for doing this a
bit confusing. I ftp'ed a kit such as the fileutils kit in tgz format
to a directory somewhere.

Is there a particular directory under the perl_root that I'm supposed to
put the files? I tried doing the gunzip and vmstar x on the resulting
tar file. This produced a subdirectory.

I set default to the subdirectory and did MMK. That seemed to go ok.
Then I did MMK TEST. This produced:

mmk test
olddef = F$Environment("Default")
Set Default [.root]
MMK all /Macro=(LIB="", LIBPERL_A="libperl.olb",
LINKTYPE="dynamic", PREFIX="",
OPTIMIZE="/List/Machine/Show=Expan",
PASTHRU_DEFINE="", PASTHRU_INC="")
Set Default 'olddef'
olddef = F$Environment("Default")
Set Default [.safename]
MMK all /Macro=(LIB="", LIBPERL_A="libperl.olb",
LINKTYPE="dynamic", PREFIX="",
OPTIMIZE="/List/Machine/Show=Expan",
PASTHRU_DEFINE="", PASTHRU_INC="")
Set Default 'olddef'
MCR $30$dkb0:[perl5_8_6]perl.exe "-MExtUtils::Command::MM" "-e"
"test_harness(0, '[.blib.lib]', '[.blib.arch]')" t/*.t
t/root........
Can't locate VMS/FileUtils/Root.pm in @INC (@INC contains: .
perl_root:[lib.VMS_AXP.5_8_6] perl_root:[lib] perl_root:[lib.site_perl.
VMS_AXP] perl_root:[lib.site_perl] /perl_root/lib/site_perl .) at
t/root.t line 5.
BEGIN failed--compilation aborted at t/root.t line 5.
%SYSTEM-W-NOSUCHFILE, no such file
dubious
Test returned status 2320 (wstat 256, 0x100)
(VMS status is 2320)
t/safename....
Can't locate VMS/FileUtils/SafeName.pm in @INC (@INC contains: .
perl_root:[lib.VMS_AXP.5_8_6] perl_root:[lib] perl_root:[lib.site_p
erl.VMS_AXP] perl_root:[lib.site_perl] /perl_root/lib/site_perl .) at
t/safename.t line 3.
BEGIN failed--compilation aborted at t/safename.t line 3.
%SYSTEM-W-NOSUCHFILE, no such file
dubious
Test returned status 2320 (wstat 256, 0x100)
(VMS status is 2320)
FAILED--2 test scripts could be run, alas--no output ever seen
%RMS-E-FNF, file not found
%MMK-F-ERRUPD, error status %X00018292 occurred when updating target
TEST_DYNAMIC

How do I deal with the "Can't local ...." problem? Is there something
I'm supposed to do that I haven't already done?

Is this a case of "if only you had read pages x,y and z then you'd know
that you missed doing blah, blah and blah?"

Thanks for any and all pointers to figuring out how this stuff can work.

Robert Boyd
Back to top
Craig A. Berry
*nix forums Guru Wannabe


Joined: 27 May 2005
Posts: 143

PostPosted: Tue Jul 18, 2006 2:28 am    Post subject: RE: Perl programming question Reply with quote

At 7:52 PM -0400 7/17/06, Boyd, Robert L wrote:
Quote:
I'm trying to add some modules to my Perl setup on VMS 7.3-2.

I am finding the process of reading the instructions for doing this a
bit confusing. I ftp'ed a kit such as the fileutils kit in tgz format
to a directory somewhere.

Is there a particular directory under the perl_root that I'm supposed to
put the files?

You should definitely NOT unpack anything under perl_root directly.
Since you should be depending on the install process to add the new
module to your Perl installation, it doesn't really matter where else
it goes while you build it. Once you have built and tested it, then
install it, which will put all the relevant bits in the correct
location under perl_root.

Quote:
I tried doing the gunzip and vmstar x on the resulting
tar file. This produced a subdirectory.

I set default to the subdirectory and did MMK. That seemed to go ok.

You're leaving out a step. The normal sequence would be:

$ perl Makefile.PL
$ mmk
$ mmk test
$ mmk install

So please verify that you ran the Makefile.PL before running MMK? I
just tried VMS::FileUtils against the current development release and
had no problem. I have not tried it with Perl 5.8.6, which is what
you appear to be using, but I doubt that would make a difference.

Quote:
Then I did MMK TEST. This produced:

mmk test
olddef = F$Environment("Default")
Set Default [.root]
MMK all /Macro=(LIB="", LIBPERL_A="libperl.olb",
LINKTYPE="dynamic", PREFIX="",
OPTIMIZE="/List/Machine/Show=Expan",
PASTHRU_DEFINE="", PASTHRU_INC="")
Set Default 'olddef'
olddef = F$Environment("Default")
Set Default [.safename]
MMK all /Macro=(LIB="", LIBPERL_A="libperl.olb",
LINKTYPE="dynamic", PREFIX="",
OPTIMIZE="/List/Machine/Show=Expan",
PASTHRU_DEFINE="", PASTHRU_INC="")
Set Default 'olddef'
MCR $30$dkb0:[perl5_8_6]perl.exe "-MExtUtils::Command::MM" "-e"
"test_harness(0, '[.blib.lib]', '[.blib.arch]')" t/*.t
t/root........
Can't locate VMS/FileUtils/Root.pm in @INC (@INC contains: .
perl_root:[lib.VMS_AXP.5_8_6] perl_root:[lib] perl_root:[lib.site_perl.
VMS_AXP] perl_root:[lib.site_perl] /perl_root/lib/site_perl .) at
t/root.t line 5.

The file it's missing should be in [.blib.lib.vms.fileutils] under
the directory where you unpacked VMS::FileUtils. Is it?

Quote:
BEGIN failed--compilation aborted at t/root.t line 5.
%SYSTEM-W-NOSUCHFILE, no such file
dubious
Test returned status 2320 (wstat 256, 0x100)
(VMS status is 2320)
t/safename....
Can't locate VMS/FileUtils/SafeName.pm in @INC (@INC contains: .
perl_root:[lib.VMS_AXP.5_8_6] perl_root:[lib] perl_root:[lib.site_p
erl.VMS_AXP] perl_root:[lib.site_perl] /perl_root/lib/site_perl .) at
t/safename.t line 3.
BEGIN failed--compilation aborted at t/safename.t line 3.
%SYSTEM-W-NOSUCHFILE, no such file
dubious
Test returned status 2320 (wstat 256, 0x100)
(VMS status is 2320)
FAILED--2 test scripts could be run, alas--no output ever seen
%RMS-E-FNF, file not found
%MMK-F-ERRUPD, error status %X00018292 occurred when updating target
TEST_DYNAMIC

How do I deal with the "Can't local ...." problem? Is there something
I'm supposed to do that I haven't already done?

Is this a case of "if only you had read pages x,y and z then you'd know
that you missed doing blah, blah and blah?"

Thanks for any and all pointers to figuring out how this stuff can work.

Robert Boyd


--
________________________________________
Craig A. Berry
mailto:craigberry@mac.com

"... getting out of a sonnet is much more
difficult than getting in."
Brad Leithauser
Back to top
Robert L Boyd
*nix forums beginner


Joined: 17 Jul 2006
Posts: 5

PostPosted: Tue Jul 18, 2006 2:43 am    Post subject: RE: Perl programming question Reply with quote

I did execute the perl Makefile.pl step before MMK.
The .pm files are in the directory. The directory I created is a
temporary directory under Perl_root:[lib], perhaps I should move the
temp directory somewhere else? It would be nice if the directions for
this kind of thing were more explicit in the "how to install" sections.


I'll try moving the kits to another disk and retry.

-----Original Message-----
From: "Craig A. Berry" <craigberry@mac.com>@DUKEPOWER
Sent: Monday, July 17, 2006 10:28 PM
To: Boyd, Robert L
Cc: vmsperl@perl.org
Subject: RE: Perl programming question

At 7:52 PM -0400 7/17/06, Boyd, Robert L wrote:
Quote:
I'm trying to add some modules to my Perl setup on VMS 7.3-2.

I am finding the process of reading the instructions for doing this a
bit confusing. I ftp'ed a kit such as the fileutils kit in tgz format
to a directory somewhere.

Is there a particular directory under the perl_root that I'm supposed
to
put the files?

You should definitely NOT unpack anything under perl_root directly.
Since you should be depending on the install process to add the new
module to your Perl installation, it doesn't really matter where else
it goes while you build it. Once you have built and tested it, then
install it, which will put all the relevant bits in the correct
location under perl_root.

Quote:
I tried doing the gunzip and vmstar x on the resulting
tar file. This produced a subdirectory.

I set default to the subdirectory and did MMK. That seemed to go ok.

You're leaving out a step. The normal sequence would be:

$ perl Makefile.PL
$ mmk
$ mmk test
$ mmk install

So please verify that you ran the Makefile.PL before running MMK? I
just tried VMS::FileUtils against the current development release and
had no problem. I have not tried it with Perl 5.8.6, which is what
you appear to be using, but I doubt that would make a difference.

Quote:
Then I did MMK TEST. This produced:

mmk test
olddef = F$Environment("Default")
Set Default [.root]
MMK all /Macro=(LIB="", LIBPERL_A="libperl.olb",
LINKTYPE="dynamic", PREFIX="",
OPTIMIZE="/List/Machine/Show=Expan",
PASTHRU_DEFINE="", PASTHRU_INC="")
Set Default 'olddef'
olddef = F$Environment("Default")
Set Default [.safename]
MMK all /Macro=(LIB="", LIBPERL_A="libperl.olb",
LINKTYPE="dynamic", PREFIX="",
OPTIMIZE="/List/Machine/Show=Expan",
PASTHRU_DEFINE="", PASTHRU_INC="")
Set Default 'olddef'
MCR $30$dkb0:[perl5_8_6]perl.exe "-MExtUtils::Command::MM" "-e"
"test_harness(0, '[.blib.lib]', '[.blib.arch]')" t/*.t
t/root........
Can't locate VMS/FileUtils/Root.pm in @INC (@INC contains: .
perl_root:[lib.VMS_AXP.5_8_6] perl_root:[lib] perl_root:[lib.site_perl.
VMS_AXP] perl_root:[lib.site_perl] /perl_root/lib/site_perl .) at
t/root.t line 5.

The file it's missing should be in [.blib.lib.vms.fileutils] under
the directory where you unpacked VMS::FileUtils. Is it?

Quote:
BEGIN failed--compilation aborted at t/root.t line 5.
%SYSTEM-W-NOSUCHFILE, no such file
dubious
Test returned status 2320 (wstat 256, 0x100)
(VMS status is 2320)
t/safename....
Can't locate VMS/FileUtils/SafeName.pm in @INC (@INC contains: .
perl_root:[lib.VMS_AXP.5_8_6] perl_root:[lib] perl_root:[lib.site_p
erl.VMS_AXP] perl_root:[lib.site_perl] /perl_root/lib/site_perl .) at
t/safename.t line 3.
BEGIN failed--compilation aborted at t/safename.t line 3.
%SYSTEM-W-NOSUCHFILE, no such file
dubious
Test returned status 2320 (wstat 256, 0x100)
(VMS status is 2320)
FAILED--2 test scripts could be run, alas--no output ever seen
%RMS-E-FNF, file not found
%MMK-F-ERRUPD, error status %X00018292 occurred when updating target
TEST_DYNAMIC

How do I deal with the "Can't local ...." problem? Is there something
I'm supposed to do that I haven't already done?

Is this a case of "if only you had read pages x,y and z then you'd know
that you missed doing blah, blah and blah?"

Thanks for any and all pointers to figuring out how this stuff can
work.

Robert Boyd


--
________________________________________
Craig A. Berry
mailto:craigberry@mac.com

"... getting out of a sonnet is much more
difficult than getting in."
Brad Leithauser
Back to top
Robert L Boyd
*nix forums beginner


Joined: 17 Jul 2006
Posts: 5

PostPosted: Tue Jul 18, 2006 12:42 pm    Post subject: RE: Perl programming question Reply with quote

Thanks for the suggestions Craig.

I'm having a bit better result -- not sure if this error message about
the manifest file is causing trouble -- the file is in the directory --
why would it squawk about it not being there? I tried with traditional
and extended filename parsing -- same result.

$ perl makefile.pl
Checking if your kit is complete...
Warning: the following files are missing in your kit:
manifest
Please inform the author.
Writing Descrip.MMS for VMS::Fileutils::Root
Writing Descrip.MMS for VMS::Fileutils::SafeName
Writing Descrip.MMS for VMS::Fileutils

$ mmk
olddef = F$Environment("Default")
Set Default [.root]
MMK all /Macro=(LIB="", LIBPERL_A="libperl.olb",
LINKTYPE="dynamic", PREFIX="",
OPTIMIZE="/List/Machine/Show=Expan",
PASTHRU_DEFINE="", PASTHRU_INC="")
cp root.pm [-.blib.lib.vms.fileutils]root.pm
Set Default 'olddef'
olddef = F$Environment("Default")
Set Default [.safename]
MMK all /Macro=(LIB="", LIBPERL_A="libperl.olb",
LINKTYPE="dynamic", PREFIX="",
OPTIMIZE="/List/Machine/Show=Expan",
PASTHRU_DEFINE="", PASTHRU_INC="")
cp safename.pm [-.blib.lib.vms.fileutils]safename.pm
Set Default 'olddef'

$ mmk test
olddef = F$Environment("Default")
Set Default [.root]
MMK all /Macro=(LIB="", LIBPERL_A="libperl.olb",
LINKTYPE="dynamic", PREFIX="",
OPTIMIZE="/List/Machine/Show=Expan",
PASTHRU_DEFINE="", PASTHRU_INC="")
Set Default 'olddef'
olddef = F$Environment("Default")
Set Default [.safename]
MMK all /Macro=(LIB="", LIBPERL_A="libperl.olb",
LINKTYPE="dynamic", PREFIX="",
OPTIMIZE="/List/Machine/Show=Expan",
PASTHRU_DEFINE="", PASTHRU_INC="")
Set Default 'olddef'
MCR $30$dkb0:[perl5_8_6]perl.exe "-MExtUtils::Command::MM" "-e"
"test_harness(0, '[.blib.lib]', '[.blib.arch]')" t/*.t
t/root........
ok
t/safename....
ok
All tests successful.
Files=2, Tests=290, 7 wallclock secs ( 0.00 cusr + 0.00 csys = 0.00
CPU)

$ mmk install
olddef = F$Environment("Default")
Set Default [.root]
MMK all /Macro=(LIB="", LIBPERL_A="libperl.olb",
LINKTYPE="dynamic", PREFIX="",
OPTIMIZE="/List/Machine/Show=Expan",
PASTHRU_DEFINE="", PASTHRU_INC="")
Set Default 'olddef'
olddef = F$Environment("Default")
Set Default [.safename]
MMK all /Macro=(LIB="", LIBPERL_A="libperl.olb",
LINKTYPE="dynamic", PREFIX="",
OPTIMIZE="/List/Machine/Show=Expan",
PASTHRU_DEFINE="", PASTHRU_INC="")
Set Default 'olddef'
Installing perl_root:[lib.site_perl.vms.fileutils]root.pm
Installing perl_root:[lib.site_perl.vms.fileutils]safename.pm
Writing perl_root:[lib.site_perl.VMS_AXP.auto.VMS.Fileutils].packlist
Appending installation info to
perl_root:[lib.VMS_AXP.5_8_6]perllocal.pod
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [11 Posts] View previous topic :: View next topic
The time now is Mon Dec 01, 2008 11:13 pm | All times are GMT
navigation Forum index » Not Unix » VMS » vmsperl
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts Newbie question: How to forward a domain to a mailbox? leei Postfix 0 Fri Aug 24, 2007 4:55 pm
No new posts configuration question for httpd Karl Wang Apache 1 Fri Jul 21, 2006 2:10 pm
No new posts nim problem/question Ron AIX 0 Fri Jul 21, 2006 1:57 pm
No new posts Need Help with Program in Perl on a Netware Server fhadzocos@gmail.com Perl 3 Fri Jul 21, 2006 1:57 pm
No new posts problems using oddmuse with mod_perl2 inside apache2.2 pe... Fergus McMenemie Perl 0 Fri Jul 21, 2006 9:48 am

Mobile Phones | Loans | Mortgage | Facebook Proxy | Houses for Sale
Copyright © 2004-2005 DeniX Solutions SRL
 
Other DeniX Solutions sites: Unix/Linux blog |  electronics forum |  medicine forum |  science forum | 
Privacy Policy


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.3686s ][ Queries: 16 (0.2049s) ][ GZIP on - Debug on ]