[32800] in Perl-Users-Digest
Perl-Users Digest, Issue: 4064 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Oct 26 14:09:37 2013
Date: Sat, 26 Oct 2013 11:09:04 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Sat, 26 Oct 2013 Volume: 11 Number: 4064
Today's topics:
READFILE sorting coding problem walfish@charter.net
Re: READFILE sorting coding problem <rweikusat@mobileactivedefense.com>
Re: READFILE sorting coding problem <bill@todbe.com>
Re: Replacement for CGI.pm <snob@pense-mainz.eu>
Re: Replacement for CGI.pm <hjp-usenet3@hjp.at>
Re: Replacement for CGI.pm <ben@morrow.me.uk>
Re: Replacement for CGI.pm <ben@morrow.me.uk>
Re: Replacement for CGI.pm <rweikusat@mobileactivedefense.com>
Re: Replacement for CGI.pm <rweikusat@mobileactivedefense.com>
Re: Replacement for CGI.pm <ignoramus21990@NOSPAM.21990.invalid>
Re: Replacement for CGI.pm <hjp-usenet3@hjp.at>
Re: Replacement for CGI.pm <rweikusat@mobileactivedefense.com>
SIgnal help <dave@invalid.invalid>
Upgrading activestate Perl <bernie@fantasyfarm.com>
Re: Upgrading activestate Perl <ben@morrow.me.uk>
Re: Upgrading activestate Perl <bernie@fantasyfarm.com>
Re: Upgrading activestate Perl <hSoPrAsMt@raSdPnAeMrs.de>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 25 Oct 2013 07:11:48 -0700 (PDT)
From: walfish@charter.net
Subject: READFILE sorting coding problem
Message-Id: <384db95e-f31c-415a-b96b-1bb5c7c2d24f@googlegroups.com>
I am new to Perl and trying to read a file (employee.txt) that has four col=
umns of data. I want to read from the file, print the first and last column=
, sorted by the first column. The code I have so far is below but when I ru=
n it, I only get a "1 file found" message, no data prints. Your help is gre=
atly appreciated.
#!/usr/bin/perl
$i =3D 0;
@names =3D open(READFILE, "employee.txt") || die "Couldn't open file: $!";
foreach(sort sort_names (@names))
{
m/^\S*\s*(\S*)\s*\S*\s*\d{3}\.\d{3}\.\d{4}\s*(\S*)$/;
print("$1\t$2\n");
++$i
}
print("$i records found\n"); =20
sub sort_names
{
$a =3D~ m/\S*\s*(\S*)/;
$one =3D $1;
$b =3D~ m/\S*\s*(\S*)/;
$two =3D $1;
$two cmp $one || $b <=3D> $a;
}
------------------------------
Date: Fri, 25 Oct 2013 15:43:10 +0100
From: Rainer Weikusat <rweikusat@mobileactivedefense.com>
Subject: Re: READFILE sorting coding problem
Message-Id: <87d2mtza0x.fsf@sable.mobileactivedefense.com>
walfish@charter.net writes:
> I am new to Perl and trying to read a file (employee.txt) that has four columns of data. I want to read from the file, print the first and last column, sorted by the first column. The code I have so far is below but when I run it, I only get a "1 file found" message, no data prints. Your help is greatly appreciated.
>
> #!/usr/bin/perl
> $i = 0;
> @names = open(READFILE, "employee.txt") || die "Couldn't open file: $!";
This should be
open(READFILE, "employee.txt") || die "Couldn't open file: $!";
@names = <READFILE>;
You want the contents of the file in @names, not the return value of
open.
------------------------------
Date: Fri, 25 Oct 2013 07:58:40 -0700
From: "$Bill" <bill@todbe.com>
Subject: Re: READFILE sorting coding problem
Message-Id: <526A8720.7090203@todbe.com>
On 10/25/2013 07:11, walfish@charter.net wrote:
> I am new to Perl and trying to read a file (employee.txt) that has four columns of data. I want to read from the file, print the first and last column, sorted by the first column. The code I have so far is below but when I run it, I only get a "1 file found" message, no data prints. Your help is greatly appreciated.
Something like this should work:
use strict;
use warnings;
open READFILE, "employee.txt" or die "open employee.txt: $! ($^E)";
my @names = <READFILE>;
chomp @names;
close READFILE;
printf "records found = %s\n", scalar @names;
foreach (sort { (split ' ', $a)[0] cmp (split ' ', $b)[0] } @names) {
print "$i: $_\n" if $debug;
printf "%s\t%s\n", (split ' ', $_)[0,3];
}
exit;
__END__
------------------------------
Date: Thu, 24 Oct 2013 22:14:53 +0200
From: Joachim Pense <snob@pense-mainz.eu>
Subject: Re: Replacement for CGI.pm
Message-Id: <bctde0Fq0g8U1@mid.individual.net>
Am 24.10.2013 18:23, schrieb Rainer Weikusat:
>
> [Random corollary: It is said that the purpose of Perl would be to make
> the simple things easy and the complicated ones possible. Expanding on
> that, the purpose of a 'web framework' would be to make the simple
> things complicated and relegate the complicated ones to the realm of
> fable.]
>
I wonder if an "HTML disassembler" is available - a program that takes
HTML code as input and produces CGI.pm output.
Joachim
------------------------------
Date: Thu, 24 Oct 2013 23:06:27 +0200
From: "Peter J. Holzer" <hjp-usenet3@hjp.at>
Subject: Re: Replacement for CGI.pm
Message-Id: <slrnl6j2uj.8lv.hjp-usenet3@hrunkner.hjp.at>
["Followup-To:" header set to comp.lang.perl.misc.]
On 2013-10-24 20:14, Joachim Pense <snob@pense-mainz.eu> wrote:
> I wonder if an "HTML disassembler" is available - a program that takes
> HTML code as input and produces CGI.pm output.
$/ = undef;
my $html = <STDIN>;
say qq{use CGI;};
say qq{print "Content-Type: text/html; charset=UTF-8\n"};
say qq{print "\n"};
say qq{print <<THE_END_OF_THE_FILE_AS_WE_KNOW_IT};
say $html;
say qq{THE_END_OF_THE_FILE_AS_WE_KNOW_IT};
SCNR,
hp
--
_ | Peter J. Holzer | Fluch der elektronischen Textverarbeitung:
|_|_) | | Man feilt solange an seinen Text um, bis
| | | hjp@hjp.at | die Satzbestandteile des Satzes nicht mehr
__/ | http://www.hjp.at/ | zusammenpaßt. -- Ralph Babel
------------------------------
Date: Thu, 24 Oct 2013 23:37:11 +0100
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: Replacement for CGI.pm
Message-Id: <n1koja-tqd1.ln1@anubis.morrow.me.uk>
Quoth "Peter J. Holzer" <hjp-usenet3@hjp.at>:
> ["Followup-To:" header set to comp.lang.perl.misc.]
> On 2013-10-24 20:14, Joachim Pense <snob@pense-mainz.eu> wrote:
> > I wonder if an "HTML disassembler" is available - a program that takes
> > HTML code as input and produces CGI.pm output.
>
> $/ = undef;
> my $html = <STDIN>;
> say qq{use CGI;};
> say qq{print "Content-Type: text/html; charset=UTF-8\n"};
> say qq{print "\n"};
> say qq{print <<THE_END_OF_THE_FILE_AS_WE_KNOW_IT};
> say $html;
> say qq{THE_END_OF_THE_FILE_AS_WE_KNOW_IT};
Shirley that should be
print <<AS_WE_KNOW_IT;
print <<'THE_END_OF_THE_FILE';
Content-type: text/html; charset=UTF-8
$html
THE_END_OF_THE_FILE
AS_WE_KNOW_IT
(Properly speaking we ought to be using Cantor's diagonal argument, of
course... (or "\Q", which is the only actually safe way to generate
Perl strings))
Ben
------------------------------
Date: Fri, 25 Oct 2013 00:39:50 +0100
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: Replacement for CGI.pm
Message-Id: <6nnoja-8ie1.ln1@anubis.morrow.me.uk>
Quoth Joachim Pense <snob@pense-mainz.eu>:
>
> I wonder if an "HTML disassembler" is available - a program that takes
> HTML code as input and produces CGI.pm output.
Given a single input, Peter's answer is actually the only correct one.
Given two or more inputs, something along the lines of 'diff -D' could
be written which would at least separate the static from the dynamic
portions. More than that would be impossible automatically.
Ben
------------------------------
Date: Fri, 25 Oct 2013 18:39:56 +0100
From: Rainer Weikusat <rweikusat@mobileactivedefense.com>
Subject: Re: Replacement for CGI.pm
Message-Id: <87ppqtxn9v.fsf@sable.mobileactivedefense.com>
Joachim Pense <snob@pense-mainz.eu> writes:
> Am 24.10.2013 18:23, schrieb Rainer Weikusat:
>> [Random corollary: It is said that the purpose of Perl would be to make
>> the simple things easy and the complicated ones possible. Expanding on
>> that, the purpose of a 'web framework' would be to make the simple
>> things complicated and relegate the complicated ones to the realm of
>> fable.]
>>
>
> I wonder if an "HTML disassembler" is available - a program that takes
> HTML code as input and produces CGI.pm output.
I don't think this would be very useful: While this could be used to
reduce the amount of redundant information in the markup, it couldn't
recover semantic information available in the code which generated the
HTML. Eg, another form of the same application is generated by the
following code:
sub form()
{
return ($cgi->start_form(-action => 'vmecs-ctrl.cgi'),
$cgi->table(8, #{border => 1 },
refresh_button(),
$cgi->empty_line(),
vmecs_ctrl_pads()),
$cgi->end_form());
}
vmecs_ctrl_pads is
sub vmecs_ctrl_pads()
{
my @output;
@output = map { vmecs_ctrl_pad($vmecs{$_}); } @vmecs_names;
unless (@output) {
return
$cgi->t_r(
$cgi->td(
$cgi->emph(Lng::str('vmecs_no_vmecs'))));
}
return @output;
}
and vmecs_ctrl_pad is a subroutine returning a list of strings which
make up the HTML for displaying various parameters of 'a vmecs' and some
buttons used to control it.
NB: This is a general problem of 'reverse compilers'. They basically
produce 'assembler code with a different syntax'.
------------------------------
Date: Fri, 25 Oct 2013 18:49:56 +0100
From: Rainer Weikusat <rweikusat@mobileactivedefense.com>
Subject: Re: Replacement for CGI.pm
Message-Id: <87iowlxmt7.fsf@sable.mobileactivedefense.com>
"Peter J. Holzer" <hjp-usenet3@hjp.at> writes:
> ["Followup-To:" header set to comp.lang.perl.misc.]
> On 2013-10-24 20:14, Joachim Pense <snob@pense-mainz.eu> wrote:
>> I wonder if an "HTML disassembler" is available - a program that takes
>> HTML code as input and produces CGI.pm output.
>
> $/ = undef;
> my $html = <STDIN>;
> say qq{use CGI;};
> say qq{print "Content-Type: text/html; charset=UTF-8\n"};
> say qq{print "\n"};
> say qq{print <<THE_END_OF_THE_FILE_AS_WE_KNOW_IT};
> say $html;
> say qq{THE_END_OF_THE_FILE_AS_WE_KNOW_IT};
This is an unrealistic use of sensible high-level language constructs
and a more real-world example could be generated by
printf("print(\"\\Q%s\\E\\n\");\n", $_) for @html;
but while this may be an appropriate representation of someone's idea
of on-the-fly HTML-generation, it doesn't illustrate technical
limitations of the facilities available for doing so.
------------------------------
Date: Fri, 25 Oct 2013 17:18:11 -0500
From: Ignoramus21990 <ignoramus21990@NOSPAM.21990.invalid>
Subject: Re: Replacement for CGI.pm
Message-Id: <qYCdnYWDGPC-c_fPnZ2dnUVZ_vGdnZ2d@giganews.com>
CGI.pm is a lifesaver, a true work of genius. I use it for all my
websites and make great money with it.
Thank you, Lincoln Stein!
What exactly is wrong with CGI.pm?
i
On 2013-10-22, Bernie Cosell <bernie@fantasyfarm.com> wrote:
> CGI.pm is very old and I gather that its use is deprecated. Is there a
> better/newer package for handling the CGI interface between Perl and the
> web server? We use it both ways: to parse the incoming variables [and
> cookies] and to generate the outgoing HTML. Our needs are pretty simple:
> just those two functions. It seems to work, and we really haven't had any
> trouble, but see more and more reports that one should *never* use
> CGI.pm... And so : if not, what to use instead? THANKS!!
>
> /Bernie\
------------------------------
Date: Sat, 26 Oct 2013 11:57:02 +0200
From: "Peter J. Holzer" <hjp-usenet3@hjp.at>
Subject: Re: Replacement for CGI.pm
Message-Id: <slrnl6n4ff.6u5.hjp-usenet3@hrunkner.hjp.at>
["Followup-To:" header set to comp.lang.perl.misc.]
On 2013-10-24 23:39, Ben Morrow <ben@morrow.me.uk> wrote:
> Quoth Joachim Pense <snob@pense-mainz.eu>:
>>
>> I wonder if an "HTML disassembler" is available - a program that takes
>> HTML code as input and produces CGI.pm output.
>
> Given a single input, Peter's answer is actually the only correct one.
I don't think so. CGI.pm provides a function for every HTML element, so
it should be possible to parse an HTML input into a DOM tree and then
serialize that as nested calls to CGI functions.
So, this small HTML file:
<html>
<head>
<title>hello</title>
<link rel="stylesheet" href="hello.css" type="text/css" />
</head>
<body>
<h1>hello, world</h1>
<p>and goodbye</p>
</body>
</html>
could be converted into:
html(
head(
title('hello'),
Link({-rel => 'stylesheet', type => 'text/css', -href => 'hello.css'}),
),
body(
h1('hello, world'),
p('and goodbye')
)
)
I think this is what Joachim meant.
I just don't think that would be terribly useful. But then I think the
html-generating functions in CGI.pm aren't very useful in general, so
that't not a big surprise ;-).
hp
--
_ | Peter J. Holzer | Fluch der elektronischen Textverarbeitung:
|_|_) | | Man feilt solange an seinen Text um, bis
| | | hjp@hjp.at | die Satzbestandteile des Satzes nicht mehr
__/ | http://www.hjp.at/ | zusammenpaßt. -- Ralph Babel
------------------------------
Date: Sat, 26 Oct 2013 18:21:24 +0100
From: Rainer Weikusat <rweikusat@mobileactivedefense.com>
Subject: Re: Replacement for CGI.pm
Message-Id: <87li1g7xt7.fsf@sable.mobileactivedefense.com>
"Peter J. Holzer" <hjp-usenet3@hjp.at> writes:
> ["Followup-To:" header set to comp.lang.perl.misc.]
> On 2013-10-24 23:39, Ben Morrow <ben@morrow.me.uk> wrote:
>> Quoth Joachim Pense <snob@pense-mainz.eu>:
>>>
>>> I wonder if an "HTML disassembler" is available - a program that takes
>>> HTML code as input and produces CGI.pm output.
>>
>> Given a single input, Peter's answer is actually the only correct one.
>
> I don't think so. CGI.pm provides a function for every HTML element, so
> it should be possible to parse an HTML input into a DOM tree and then
> serialize that as nested calls to CGI functions.
>
> So, this small HTML file:
>
> <html>
> <head>
> <title>hello</title>
> <link rel="stylesheet" href="hello.css" type="text/css" />
> </head>
> <body>
> <h1>hello, world</h1>
> <p>and goodbye</p>
> </body>
> </html>
>
> could be converted into:
>
> html(
> head(
> title('hello'),
> Link({-rel => 'stylesheet', type => 'text/css', -href => 'hello.css'}),
> ),
> body(
> h1('hello, world'),
> p('and goodbye')
> )
> )
>
> I think this is what Joachim meant.
>
> I just don't think that would be terribly useful.
As I already wrote elsewhere: 'Reverse-compiling' some generated code is
never very useful. But this had already turned the unstructured HTML
character stream into a structured equivalent (albeit a poorly
structured one), reduced the amount of text by about 50% and enabled
future changes with less work and less chances for errors, eg, someone
could change the h1 to a h2 by changing a single character and the
correct end tag would be generated automatically.
Things become a little more interesting when realizing that this is
actually a functional/ applicative program because it doesn't have to
print something as a side effect but could return a list of string
instead.
------------------------------
Date: Sat, 26 Oct 2013 09:54:01 +0000 (UTC)
From: "Dave Saville" <dave@invalid.invalid>
Subject: SIgnal help
Message-Id: <fV45K0OBJxbE-pn2-9kbredg9NKvd@paddington.bear.den>
I am developing a script that uses Net::Ping
I need to be able to CTRL-C it and have my END block run.
I have $SIG{INT} = \&catch; at the top of the script;
sub catch
{
$int++;
$SIG{INT} = 'DEFAULT' if $int > 3;
}
In the main program I check for $int being no-zero and exit.
The actual ping is issued from a subroutine.
If the other end is responding then a CTRL-C will stop it and run my
END block. However if the other end is *not* responding then I get
this:
.........
CTRL-C Nothing happens, if I leave it it stays that way and no more
output appears.
CTRL-C
Bad arg length for Socket::unpack_sockaddr_in, length is 0, should be
16 at D:/u
sr/lib/perl/lib/5.8.2/os2/Socket.pm line 370.
Followed by the print from my END block.
What's going on and what have I missed? I am guessing that the
Net::Ping code has installed another handler?
TIA
--
Regards
Dave Saville
------------------------------
Date: Thu, 24 Oct 2013 22:05:42 -0400
From: Bernie Cosell <bernie@fantasyfarm.com>
Subject: Upgrading activestate Perl
Message-Id: <4uij69p6eavd224hbqt4cbkf5ecemdflu0@library.airnews.net>
I discovered that my tried-and-true Activestate 5.12 is no longer supported
[unless you buy a business license] and so I'm upgrading to 5.16. From
what I've gathered you *can't* "upgrade" -- basically you have to install
the new one and 'start over'. I'm not sure how the system will work.
Since the ActiveState stuff is properly "installed" [right there in
installed programs: ActivePerl 5.12.2 Build 1202 (64 bit)] I'm thinking
that the cleanest thing to do is *uninstall* 5.12 and then just install
5.16 [I really don't need them both and I'd like my "current" Perl to stay
where it is now: c:\perl64].
first thing, I know I'll need to reinstall all of the modules that I've
added to 5.12 over the years. Here's a script that I think will do the
job:
#!/usr/bin/perl
# Set up a batch script that'll "reinstall" all of your load packages and
## modules
use strict;
use warnings ;
open(MODLIST, "-|", "ppm list site")
or die "Can't start ppm: $!\n" ;
<MODLIST>; <MODLIST>; <MODLIST> ; # Throw away column headings
while (<MODLIST>)
{ my ($module) = m/\| ([^ ]*) / ;
last unless $module ;
print "ppm install $module --area site\n" ;
}
exit ;
Send it to a ".bat" file, and then after installing the new Perl I'm hoping
I can just run the script and get everything put back in place.
In terms of not messing things up, my plan is a little baroque but I think
will work: rename c:\perl64 to be c:\perl64-12. Install perl 5.16 in
c:\perl, try my .bat script and see if everything gets reloaded properly.
If it does, all I need to do is figure out a clean way to get rid of the
5.12 stuff. If it doesn't, I *THINK* that if I just move c:\perl64-12 back
to c:\perl, it should all work. All scary...:(
I assume many of you have upgraded AS perl from version to version -- how'd
you do it? was it hard? safe? did all of your programs "just work" when
you were done?
Thanks! /Bernie\
--
Bernie Cosell Fantasy Farm Fibers
bernie@fantasyfarm.com Pearisburg, VA
--> Too many people, too few sheep <--
------------------------------
Date: Fri, 25 Oct 2013 08:44:48 +0100
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: Upgrading activestate Perl
Message-Id: <g4kpja-jht1.ln1@anubis.morrow.me.uk>
Quoth Bernie Cosell <bernie@fantasyfarm.com>:
>
> In terms of not messing things up, my plan is a little baroque but I think
> will work: rename c:\perl64 to be c:\perl64-12. Install perl 5.16 in
> c:\perl, try my .bat script and see if everything gets reloaded properly.
> If it does, all I need to do is figure out a clean way to get rid of the
> 5.12 stuff. If it doesn't, I *THINK* that if I just move c:\perl64-12 back
> to c:\perl, it should all work. All scary...:(
You're not being entirely clear about whether you want perl to end up in
c:\perl or c:\perl64.
You've missed the 'officially uninstall perl 5.12' step. If you try to
do that after you've renamed c:\perl64, it won't work, and if you've
installed 5.16 to the same location in the meanwhile it will probably
break the 5.16 installation.
IMHO the right methond is:
- Make sure you have recent and complete backups.
- Uninstall 5.12.
- Install 5.16.
- Reinstall modules.
- If anything goes wrong, restore from backup.
You could also try playing with System Restore to see if you can make it
work; I've never used it myself, but I have successfully used filesystem
snapshots to roll back a bad upgrade on other OSs.
If you don't have backups and can't get system restore to play, I would
recommend:
- Tar up (zip up) the entire c:\perl64 directory.
- Make sure you've still got the installer for (the right build of)
5.12.
- Uninstall 5.12.
- Install 5.16 and modules.
- If anything goes wrong:
- Uninstall 5.16.
- Manually clean out the c:\perl* directory if there's anything
there.
- Reinstall 5.12 from the installer.
- Untar your backup copy to restore the installed modules.
> I assume many of you have upgraded AS perl from version to version -- how'd
> you do it? was it hard? safe? did all of your programs "just work" when
> you were done?
I've done several AS upgrades, all of which were difficult. But then,
this was a while ago (I think the last version of AS Perl I used was one
of the 5.8s), and I had usually installed modules from CPAN and
privately-written modules into site_perl along with the PPMed modules,
so it may not be a good example.
Ben
------------------------------
Date: Fri, 25 Oct 2013 15:22:49 -0400
From: Bernie Cosell <bernie@fantasyfarm.com>
Subject: Re: Upgrading activestate Perl
Message-Id: <p0hl69hqe49g4e014umf1u3ja3c058efaq@library.airnews.net>
Ben Morrow <ben@morrow.me.uk> wrote:
} You've missed the 'officially uninstall perl 5.12' step. If you try to
} do that after you've renamed c:\perl64, it won't work, and if you've
} installed 5.16 to the same location in the meanwhile it will probably
} break the 5.16 installation.
}
} IMHO the right methond is:
}
} - Make sure you have recent and complete backups.
} - Uninstall 5.12.
} - Install 5.16.
} - Reinstall modules.
} - If anything goes wrong, restore from backup.
That sounds right -- I do have backups. I'm not sure how much I'd have to
restore if something goes awry -- It'd be possible but a pain to restore
all of the system drive [c:], but that'd work for-sure.
} You could also try playing with System Restore to see if you can make it
} work; I've never used it myself, but I have successfully used filesystem
} snapshots to roll back a bad upgrade on other OSs.
I'm thinking the same thing. I don't think restore-points save a lot of
data, but what I could do is;
make a restore point
uninstall 5.12
...
if anything goes wrong, go back to the restore point and then pull
c:\perl64 in from the backup.
} I've done several AS upgrades, all of which were difficult. But then,
} this was a while ago (I think the last version of AS Perl I used was one
} of the 5.8s), and I had usually installed modules from CPAN and
} privately-written modules into site_perl along with the PPMed modules,
} so it may not be a good example.
I guess I'm lucky -- all of my modules are ppm'ed and so the script, above,
*ought* to put all the modules I use back.
THANKS! /bernie\
--
Bernie Cosell Fantasy Farm Fibers
bernie@fantasyfarm.com Pearisburg, VA
--> Too many people, too few sheep <--
------------------------------
Date: Sat, 26 Oct 2013 09:13:22 +0200
From: "Horst-W. Radners" <hSoPrAsMt@raSdPnAeMrs.de>
Subject: Re: Upgrading activestate Perl
Message-Id: <l4fq2j$vpb$1@online.de>
Bernie Cosell schrieb am 25.10.2013 04:05:
> I discovered that my tried-and-true Activestate 5.12 is no longer supported
> [unless you buy a business license] and so I'm upgrading to 5.16. From
> what I've gathered you *can't* "upgrade" -- basically you have to install
> the new one and 'start over'. I'm not sure how the system will work.
> Since the ActiveState stuff is properly "installed" [right there in
> installed programs: ActivePerl 5.12.2 Build 1202 (64 bit)] I'm thinking
> that the cleanest thing to do is *uninstall* 5.12 and then just install
> 5.16 [I really don't need them both and I'd like my "current" Perl to stay
> where it is now: c:\perl64].
>
> first thing, I know I'll need to reinstall all of the modules that I've
> added to 5.12 over the years. Here's a script that I think will do the
> job:
> [...]
Please note that Activestate itself recommends to uninstall the old
version before installing the new one.
To get the same set of packages in the new install they say:
AS> You can use ppm profile to help save and restore your locally
AS> installed PPM packages. For example, to save a profile before you
AS> upgrade, you can type:
AS>
AS> ppm profile save C:\profile.xml
AS>
AS> Once you have saved this profile, you can proceed with the new
AS> install. Once done, you can use the profile you saved to reinstall
AS> the same set of PPM packages in your new installation by typing:
AS>
AS> ppm profile restore C:\profile.xml
I've successfully used this approach myself, as long as all installed
packages are ppm'ed, of course.
Best regards, Horst
--
<remove S P A M 2x from my email address to get the real one>
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
Back issues are available via anonymous ftp from
ftp://cil-www.oce.orst.edu/pub/perl/old-digests.
#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V11 Issue 4064
***************************************