[29759] in Perl-Users-Digest
Perl-Users Digest, Issue: 1002 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Nov 4 02:10:08 2007
Date: Sun, 4 Nov 2007 00:09:05 -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 Sun, 4 Nov 2007 Volume: 11 Number: 1002
Today's topics:
Re: !Help: can't get into perl -MCPAN -e shell <mmccaws@comcast.net>
Re: !Help: can't get into perl -MCPAN -e shell <mmccaws@comcast.net>
=?utf-8?B?4piF4piF4piFIOKYheKYheKYhSBTRVggICDimIXimIXim <trytuy@gmail.com>
Getting MySQL table info in perl script <Occidental@comcast.net>
How the scrip can continue <stoupa@practisoft.cz>
Re: How the scrip can continue <jurgenex@hotmail.com>
Re: How the scrip can continue <bik.mido@tiscalinet.it>
Re: How the scrip can continue xhoster@gmail.com
Re: How the scrip can continue <stoupa@practisoft.cz>
Re: How the scrip can continue <ben@morrow.me.uk>
Re: My Perl scripts don't run anymore <graham@letsgouk.com>
Re: My Perl scripts don't run anymore <tadmc@seesig.invalid>
Re: My Perl scripts don't run anymore <uri@stemsystems.com>
new CPAN modules on Sun Nov 4 2007 (Randal Schwartz)
Re: Removing .cpan Directory <mmccaws@comcast.net>
Re: Removing .cpan Directory <spamtrap@dot-app.org>
Weak references are not implemented in the version of p zigzagdna@yahoo.com
Re: Weak references are not implemented in the version <ben@morrow.me.uk>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sat, 03 Nov 2007 08:31:44 -0700
From: mmccaws2 <mmccaws@comcast.net>
Subject: Re: !Help: can't get into perl -MCPAN -e shell
Message-Id: <1194103904.156886.72880@i38g2000prf.googlegroups.com>
On Nov 3, 6:10 am, brian d foy <brian.d....@gmail.com> wrote:
> In article <1194058168.638297.119...@t8g2000prg.googlegroups.com>,
>
> mmccaws2 <mmcc...@comcast.net> wrote:
> > Well, reinstall perl,latest version my administrator could grab, which
> > we did, has not changed my ability to log into the perl shell.
>
> There is no Perl shell.
>
> And, it sounds like your administrator needs to recompile Perl. The
> binary she is installing is broken.
>
>
I had to remove the .cpan/CPAN.pm file to get back a prompt.
Mike
------------------------------
Date: Sat, 03 Nov 2007 08:35:22 -0700
From: mmccaws2 <mmccaws@comcast.net>
Subject: Re: !Help: can't get into perl -MCPAN -e shell
Message-Id: <1194104122.616202.311140@k35g2000prh.googlegroups.com>
On Nov 3, 8:31 am, mmccaws2 <mmcc...@comcast.net> wrote:
> On Nov 3, 6:10 am, brian d foy <brian.d....@gmail.com> wrote:
>
> > In article <1194058168.638297.119...@t8g2000prg.googlegroups.com>,
>
> > mmccaws2 <mmcc...@comcast.net> wrote:
> > > Well, reinstall perl,latest version my administrator could grab, which
> > > we did, has not changed my ability to log into the perl shell.
>
> > There is no Perl shell.
>
> > And, it sounds like your administrator needs to recompile Perl. The
> > binary she is installing is broken.
>
> I had to remove the .cpan/CPAN.pm file to get back a prompt.
>
> Mike
And thanks everyone for your help. For us not so experience in Perl,
getting positive feedback seems to drive me to continue learning and
hopefully become more proficient.
Mike
------------------------------
Date: Sun, 04 Nov 2007 04:35:49 -0000
From: "trytuy@gmail.com" <trytuy@gmail.com>
Subject: =?utf-8?B?4piF4piF4piFIOKYheKYheKYhSBTRVggICDimIXimIXimIUgICBGVUNLSU5HICAgU1RJTEwgIEZSRUXimIXimIXimIUg4piF4piF4piFIEJFQVVURVkgIFNFWCAgUk9NQU5DRSAgU0VYICDimIXimIXimIUg4piF4piF4piFIOKYheKYheKYhQ==?=
Message-Id: <1194150949.523559.125760@e34g2000pro.googlegroups.com>
4piF4piF4piFICDimIXimIXimIUgIOKYheKYheKYhQpXT1JMRCAgU0VYICBJTiAgTElWRQoKCklO
RElBTiAgU0VYICBGVUNLSU5HICBTVElMTAoKClRBTUlMICBHSVJMUyAgU0VYICAgRlJFRQoKU0VY
ICAgU0VYICAgU0VYICBTRVggICBTRVgKCgpodHRwOi8vc2V4b25vY2l0aC5ibG9nc3BvdC5jb20v
CgoKCuKYheKYheKYhSAg4piF4piF4piFICDimIXimIXimIUgIOKYheKYheKYhSAg4piF4piF4piF
Cg==
------------------------------
Date: Sat, 03 Nov 2007 09:26:17 -0700
From: Occidental <Occidental@comcast.net>
Subject: Getting MySQL table info in perl script
Message-Id: <1194107177.955585.199080@o38g2000hse.googlegroups.com>
..ie the column name, definitions (varchar(100) etc). The most
obvious way is to parse the output from describe table_name. Is there
an easier way? My goal is to create a generic INSERT sub, which takes
as args table_name and a hash reference, eg:
$table_name = "TheTable";
$hash(Int1) = 99;
$hash(Float2) = 1.54;
$hash(String7) = "Goodbye cruel world";
..where Float2, Int1, String7 are some but not all cols in mysql table
TheTable. The sub is invoked as follows:
DoInsert($table_name, \%hash);
DoInsert will generate and execute the INSERT statement, NULLing out
fields not in %hash, single quoting string fields, etc., maybe even
doing data tyep compatibility tests. I would be happy to learn that
some one has beaten me to it, and a procedure like DoInsert already
exists.
------------------------------
Date: Sat, 3 Nov 2007 16:59:35 +0100
From: "Petr Vileta" <stoupa@practisoft.cz>
Subject: How the scrip can continue
Message-Id: <fgi5to$ne9$1@ns.felk.cvut.cz>
I wrote simple script stared from Apache. This do something few seconds and
at the end send mail somewhere. All works fine if I don't press Cancel
button in browser. But I need a script to continue in work regardles of http
connection is alive or canceled. I set my $SIGs but without success. Know
anybody what signal Apache send to perl scripts when user cancel connection?
-------------- test.cgi ------------------
#!/usr/bin/perl
use strict;
$|=1;
our $sig='';
$SIG{'QUIT'}=sub {$sig='QUIT';};
$SIG{'TERM'}=sub {$sig='TERM';};
$SIG{'PIPE'}=sub {$sig='PIPE';};
$SIG{'ABRT'}=sub {$sig='ABRT';};
$SIG{'HUP'}=sub {$sig='HUP';};
$SIG{'KILL'}=sub {$sig='KILL';};
$SIG{'STOP'}=sub {$sig='STOP';};
$SIG{'ALRM'}=sub {$sig='ALRM';};
$SIG{'BREAK'}=sub {$sig='BREAK';};
$SIG{'STOP'}=sub {$sig='STOP';};
$SIG{'__DIE__'}=sub {$sig='__DIE__';};
my $sendmail='/usr/sbin/sendmail';
print "Content-Type: text/html\n\n<html><body>Sending mail, please wait";
foreach (1..10)
{
print $_ . ' 'x512;
sleep 3;
}
send_mail($sendmail, 'Hurry');
print "<br>Done.</body></html>\n";
sub send_mail
{
my ($sendmail,$msg)=@_;
# here is send mail somewhere
}
-------------- test.cgi ------------------
--
Petr Vileta, Czech republic
(My server rejects all messages from Yahoo and Hotmail. Send me your mail
from another non-spammer site please.)
------------------------------
Date: Sat, 03 Nov 2007 16:43:13 GMT
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: How the scrip can continue
Message-Id: <By1Xi.751$bm.616@trndny08>
Petr Vileta wrote:
> $SIGs but without success. Know anybody what signal Apache send to
> perl scripts when user cancel connection?
I would suggest you ask in a NG that actually deals with Apache and web
servers. Chances are people there know much more about Apache than here.
jue
------------------------------
Date: Sat, 03 Nov 2007 18:27:42 +0100
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: How the scrip can continue
Message-Id: <oobpi3tfltnt7ptcmb1ab1t3rli2ort8el@4ax.com>
On Sat, 3 Nov 2007 16:59:35 +0100, "Petr Vileta"
<stoupa@practisoft.cz> wrote:
>I wrote simple script stared from Apache. This do something few seconds and
>at the end send mail somewhere. All works fine if I don't press Cancel
>button in browser. But I need a script to continue in work regardles of http
>connection is alive or canceled. I set my $SIGs but without success. Know
>anybody what signal Apache send to perl scripts when user cancel connection?
I think you could adapt the technique described in
<http://www.stonehenge.com/merlyn/LinuxMag/col39.html> instead. That
is, fork a process to do the actual job.
Michele
--
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
.'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,
------------------------------
Date: 04 Nov 2007 01:09:32 GMT
From: xhoster@gmail.com
Subject: Re: How the scrip can continue
Message-Id: <20071103210935.962$YR@newsreader.com>
"Petr Vileta" <stoupa@practisoft.cz> wrote:
> I wrote simple script stared from Apache. This do something few seconds
> and at the end send mail somewhere. All works fine if I don't press
> Cancel button in browser. But I need a script to continue in work
> regardles of http connection is alive or canceled. I set my $SIGs but
> without success. Know anybody what signal Apache send to perl scripts
> when user cancel connection?
I've heard rumors that it sends a TERM; followed shortly after by an
untrappable KILL, if necessary.
Fork and have the child do the work. If the parent gets killed the child
will probably continue. (For unix-like OSes)
Xho
--
-------------------- http://NewsReader.Com/ --------------------
The costs of publication of this article were defrayed in part by the
payment of page charges. This article must therefore be hereby marked
advertisement in accordance with 18 U.S.C. Section 1734 solely to indicate
this fact.
------------------------------
Date: Sun, 4 Nov 2007 03:32:02 +0100
From: "Petr Vileta" <stoupa@practisoft.cz>
Subject: Re: How the scrip can continue
Message-Id: <fgjb1g$19e6$1@ns.felk.cvut.cz>
xhoster@gmail.com wrote:
> "Petr Vileta" <stoupa@practisoft.cz> wrote:
>> I wrote simple script stared from Apache. This do something few
>> seconds and at the end send mail somewhere. All works fine if I
>> don't press Cancel button in browser. But I need a script to
>> continue in work regardles of http connection is alive or canceled.
>> I set my $SIGs but without success. Know anybody what signal Apache
>> send to perl scripts when user cancel connection?
>
> I've heard rumors that it sends a TERM; followed shortly after by an
> untrappable KILL, if necessary.
>
I will try to write some to file in these two SIGs hacked to my routines.
> Fork and have the child do the work. If the parent gets killed the
> child will probably continue. (For unix-like OSes)
>
This is a problem. My script must run on *nix and Win OS too. On both are
Appache running, but on Win platform fork not work correctly (here is
emulated only). Above this my script is a "fat boy" ;-) and if I know right
the fork create a copy of script, right?
--
Petr Vileta, Czech republic
(My server rejects all messages from Yahoo and Hotmail. Send me your mail
from another non-spammer site please.)
------------------------------
Date: Sun, 4 Nov 2007 05:59:15 +0000
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: How the scrip can continue
Message-Id: <jm3005-tt5.ln1@osiris.mauzo.dyndns.org>
Quoth "Petr Vileta" <stoupa@practisoft.cz>:
> xhoster@gmail.com wrote:
> > "Petr Vileta" <stoupa@practisoft.cz> wrote:
> >> I wrote simple script stared from Apache. This do something few
> >> seconds and at the end send mail somewhere. All works fine if I
> >> don't press Cancel button in browser. But I need a script to
> >> continue in work regardles of http connection is alive or canceled.
> >> I set my $SIGs but without success. Know anybody what signal Apache
> >> send to perl scripts when user cancel connection?
> >
> > I've heard rumors that it sends a TERM; followed shortly after by an
> > untrappable KILL, if necessary.
> >
> I will try to write some to file in these two SIGs hacked to my routines.
Note that you can't handle SIGKILL (that's the point).
> > Fork and have the child do the work. If the parent gets killed the
> > child will probably continue. (For unix-like OSes)
> >
> This is a problem. My script must run on *nix and Win OS too. On both are
> Appache running, but on Win platform fork not work correctly (here is
> emulated only).
Put the bulk of the work in a separate script and run it with
system(1, ...) (see FUNCTION IMPLEMENTATIONS/system in perlport) or
Win32::Process.
> Above this my script is a "fat boy" ;-) and if I know right
> the fork create a copy of script, right?
Under Unix, not in any meaningful sense. The copy starts out sharing
everything with its parent, and only things that you modify are copied.
Ben
------------------------------
Date: Sat, 3 Nov 2007 15:44:10 -0000
From: "Graham Stow" <graham@letsgouk.com>
Subject: Re: My Perl scripts don't run anymore
Message-Id: <fgi53o$2q9j$1@energise.enta.net>
"Graham Stow" <graham@letsgouk.com> wrote in message
news:fgi25k$2kv6$1@energise.enta.net...
>
> "A. Sinan Unur" <1usa@llenroc.ude.invalid> wrote in message
> news:Xns99DD6C7EE8B7Aasu1cornelledu@127.0.0.1...
>> "Graham Stow" <graham@letsgouk.com> wrote in
>> news:fgi0ql$2iiv$1@energise.enta.net:
>>
>> You can manually fix the file associations or just uninstall and
>> reinstall ActiveState Perl to restore them for you.
> As I say, before when I double clicked on a Perl script it opened in
> Wordpad, and it does so now, so I can't see that file association has
> anyrthing to do with this.
>
I spoke too soon. You were absolutely correct Sinan - it was a file
association problem. Can't think how it happened though....
------------------------------
Date: Sun, 04 Nov 2007 02:33:50 GMT
From: Tad McClellan <tadmc@seesig.invalid>
Subject: Re: My Perl scripts don't run anymore
Message-Id: <slrnfip4u4.h5n.tadmc@tadmc30.sbcglobal.net>
Graham Stow <graham@letsgouk.com> wrote:
>
> "A. Sinan Unur" <1usa@llenroc.ude.invalid> wrote in message
> news:Xns99DD6C7EE8B7Aasu1cornelledu@127.0.0.1...
>> "Graham Stow" <graham@letsgouk.com> wrote in
>> news:fgi0ql$2iiv$1@energise.enta.net:
>>
>>> Stupidly, I ran the script below (copied from the book 'Perl - I
>>> Didn't Know You Could Do That...' by Martin C. Brown) without
>>> understanding what the script was doing.
>>
>> Well, the script does not do anything other than send mail (I hope those
>> are not real server and user names and password you provided).
> I trust the author had the foresight not to use real server and user names,
> and password.
Trusting this particular author is a very bad idea.
See the thread with
Message-ID: 7gnc7e$k9i$1@nnrp1.dejanews.com
wherein many of us had a good laugh at this author's expense.
--
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"
------------------------------
Date: Sun, 04 Nov 2007 02:53:23 GMT
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: My Perl scripts don't run anymore
Message-Id: <x7mytun2l8.fsf@mail.sysarch.com>
>>>>> "TM" == Tad McClellan <tadmc@seesig.invalid> writes:
>>>> Stupidly, I ran the script below (copied from the book 'Perl - I
>>>> Didn't Know You Could Do That...' by Martin C. Brown) without
>>>> understanding what the script was doing.
TM> Trusting this particular author is a very bad idea.
TM> See the thread with
TM> Message-ID: 7gnc7e$k9i$1@nnrp1.dejanews.com
TM> wherein many of us had a good laugh at this author's expense.
wow, that was a fun thread and LONG ago. brings back memories as mine
are corrupted by cosmic rays. amazing how much has changed in 8.5 years.
uri
--
Uri Guttman ------ uri@stemsystems.com -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org
------------------------------
Date: Sun, 4 Nov 2007 04:42:17 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Sun Nov 4 2007
Message-Id: <Jqyt2H.1u8u@zorch.sf-bay.org>
The following modules have recently been added to or updated in the
Comprehensive Perl Archive Network (CPAN). You can install them using the
instructions in the 'perlmodinstall' page included with your Perl
distribution.
Archive-Tar-Merge-0.01
http://search.cpan.org/~mschilli/Archive-Tar-Merge-0.01/
Merge two or more tarballs into one
----
Business-US-USPS-WebTools-1.11
http://search.cpan.org/~bdfoy/Business-US-USPS-WebTools-1.11/
Use the US Postal Service Web Tools
----
CFPlus-0.9955
http://search.cpan.org/~mlehmann/CFPlus-0.9955/
undocumented utility garbage for our crossfire client
----
CPAN-Test-Dummy-Perl5-Make-FailLate-1.01
http://search.cpan.org/~dagolden/CPAN-Test-Dummy-Perl5-Make-FailLate-1.01/
CPAN Test Dummy
----
CPAN-Test-Dummy-Perl5-Make-PLExit-1.01
http://search.cpan.org/~dagolden/CPAN-Test-Dummy-Perl5-Make-PLExit-1.01/
CPAN Test Dummy
----
Catalyst-Plugin-CommandLine-0.03
http://search.cpan.org/~jkutej/Catalyst-Plugin-CommandLine-0.03/
Catalyst plugin to make $c available also for scripts.
----
Class-Dot-1.5.0
http://search.cpan.org/~asksh/Class-Dot-1.5.0/
Simple and fast properties for Perl 5.
----
Class-Dot-2.0.0_04
http://search.cpan.org/~asksh/Class-Dot-2.0.0_04/
Simple and fast properties for Perl 5.
----
Data-Decode-0.00001
http://search.cpan.org/~dmaki/Data-Decode-0.00001/
Pluggable Data Decoder
----
Data-Decode-0.00002
http://search.cpan.org/~dmaki/Data-Decode-0.00002/
Pluggable Data Decoder
----
Digest-CRC-0.12
http://search.cpan.org/~olimaul/Digest-CRC-0.12/
Generic CRC functions
----
Egg-Model-DBIC-2.03
http://search.cpan.org/~lushe/Egg-Model-DBIC-2.03/
DBIx::Class for Egg Model.
----
Egg-Plugin-Authen-Captcha-0.02
http://search.cpan.org/~lushe/Egg-Plugin-Authen-Captcha-0.02/
Plugin for Authen::Captcha.
----
Egg-Plugin-BackUP-Easy-2.02
http://search.cpan.org/~lushe/Egg-Plugin-BackUP-Easy-2.02/
Preserve backup data for Egg plugin.
----
Egg-Plugin-Cache-2.02
http://search.cpan.org/~lushe/Egg-Plugin-Cache-2.02/
cache for Egg plugin.
----
Egg-Plugin-Cache-UA-0.02
http://search.cpan.org/~lushe/Egg-Plugin-Cache-UA-0.02/
The result of LWP is cached for Egg::Plugin.
----
Egg-Plugin-Crypt-CBC-2.02
http://search.cpan.org/~lushe/Egg-Plugin-Crypt-CBC-2.02/
Crypt::CBC for Egg Plugin.
----
Egg-Plugin-IxHash-2.03
http://search.cpan.org/~lushe/Egg-Plugin-IxHash-2.03/
Tie::Hash::Indexed for Egg plugin.
----
Egg-Plugin-LWP-2.03
http://search.cpan.org/~lushe/Egg-Plugin-LWP-2.03/
LWP for Egg Plugin.
----
Egg-Plugin-MailSend-2.02
http://search.cpan.org/~lushe/Egg-Plugin-MailSend-2.02/
Mail is delivered for Egg Plugin.
----
Egg-Plugin-Net-Ping-2.02
http://search.cpan.org/~lushe/Egg-Plugin-Net-Ping-2.02/
Net::Ping for Egg plugin.
----
Egg-Plugin-Net-Scan-2.01
http://search.cpan.org/~lushe/Egg-Plugin-Net-Scan-2.01/
Network host's port is checked.
----
Egg-Release-2.25
http://search.cpan.org/~lushe/Egg-Release-2.25/
Version of Egg WEB Application Framework.
----
Egg-Release-JSON-0.02
http://search.cpan.org/~lushe/Egg-Release-JSON-0.02/
JSON for Egg::Plugin.
----
Egg-Release-XML-FeedPP-0.02
http://search.cpan.org/~lushe/Egg-Release-XML-FeedPP-0.02/
XML::FeedPP module kit for Egg.
----
Egg-View-TT-2.01
http://search.cpan.org/~lushe/Egg-View-TT-2.01/
Template ToolKit for Egg View.
----
File-Fetch-0.13_01
http://search.cpan.org/~kane/File-Fetch-0.13_01/
A generic file fetching mechanism
----
File-Marker-0.13
http://search.cpan.org/~dagolden/File-Marker-0.13/
Set and jump between named position markers on a filehandle
----
File-RandomLine-0.19
http://search.cpan.org/~dagolden/File-RandomLine-0.19/
Retrieve random lines from a file
----
Getopt-Mixed-Help-0.20
http://search.cpan.org/~dorner/Getopt-Mixed-Help-0.20/
combine Getopt::Mixed with usage and help
----
Image-Embroidery-1.2
http://search.cpan.org/~kbaucom/Image-Embroidery-1.2/
Parse and display embroidery data files
----
Mail-Builder-1.02
http://search.cpan.org/~maros/Mail-Builder-1.02/
Easily create e-mails with attachments, html and inline images
----
Module-Cloud-0.08
http://search.cpan.org/~marcel/Module-Cloud-0.08/
Generates a tag cloud for modules used in given code
----
MooseX-GlobRef-Object-0.0202
http://search.cpan.org/~dexter/MooseX-GlobRef-Object-0.0202/
Store a Moose object in glob reference
----
MooseX-Workers-0.03
http://search.cpan.org/~perigrin/MooseX-Workers-0.03/
Provides a simple sub-process management for asynchronous tasks.
----
Net-Amazon-0.44
http://search.cpan.org/~boumenot/Net-Amazon-0.44/
Framework for accessing amazon.com via REST
----
PDF-API2-0.66
http://search.cpan.org/~areibens/PDF-API2-0.66/
A Perl Module Chain to faciliate the Creation and Modification of High-Quality "Portable Document Format (aka. PDF)" Files.
----
PPIx-Grep-v0.0.2
http://search.cpan.org/~elliotjs/PPIx-Grep-v0.0.2/
Search PPI documents (not Perl code).
----
Parse-BooleanLogic-0.02
http://search.cpan.org/~ruz/Parse-BooleanLogic-0.02/
parser of boolean expressions
----
Parse-Marpa-0.001_031
http://search.cpan.org/~jkegl/Parse-Marpa-0.001_031/
Jay Earley's general parsing algorithm with LR(0) precomputation
----
Text-Template-Simple-0.49_01
http://search.cpan.org/~burak/Text-Template-Simple-0.49_01/
Simple text template engine
----
Tk-Tree-4.71
http://search.cpan.org/~srezic/Tk-Tree-4.71/
Create and manipulate Tree widgets
If you're an author of one of these modules, please submit a detailed
announcement to comp.lang.perl.announce, and we'll pass it along.
This message was generated by a Perl program described in my Linux
Magazine column, which can be found on-line (along with more than
200 other freely available past column articles) at
http://www.stonehenge.com/merlyn/LinuxMag/col82.html
print "Just another Perl hacker," # the original
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
------------------------------
Date: Sat, 03 Nov 2007 08:30:37 -0700
From: mmccaws2 <mmccaws@comcast.net>
Subject: Re: Removing .cpan Directory
Message-Id: <1194103837.854245.299610@v23g2000prn.googlegroups.com>
On Nov 3, 7:20 am, mmccaws2 <mmcc...@comcast.net> wrote:
> On Nov 3, 6:10 am, Sherman Pendley <spamt...@dot-app.org> wrote:
>
>
>
> > mmccaws2 <mmcc...@comcast.net> writes:
> > > So if you reinstall perl and the only thing that stay the same, I
> > > believe, is that .cpan directory in my home directory. You know /home/
> > > username/.cpan. So I'm thinking about either blowing away my .cpan
> > > directory and see if that makes a difference.
>
> > > Does anyone know what should happen?
>
> > That depends. If you normally run CPAN as root, then it stores its config
> > info (mirror locations, etc) in the global CPAN/Config.pm module, and the
> > only thing in .cpan will be downloaded tarballs, build trees, and so forth;
> > in other words, nothing critical.
>
> > If you don't run CPAN as root, then the config params are stored in .cpan/
> > CPAN/MyConfig.pm instead. This could be the case if you use CPAN to install
> > modules in your home directory, or if you're using a newer CPAN.pm that lets
> > you limit root authority to just the final "sudo make install".
>
> > If you want to "reset" CPAN, and if it's using a global CPAN::Config.pm,
> > then it might not be a bad idea to delete that too. CPAN::MyConfig.pm, of
> > course, lives under .cpan, so deleting the directory will catch it too.
>
> > After that, CPAN should prompt you to go through the initial configuration
> > steps again, setting up the default Makefile.PL arguments, choosing mirrors,
> > etc. And because you've deleted the cached info, it will fetch fresh copies
> > of its module and author indexes.
>
> > sherm--
>
> > --
> > Web Hosting by West Virginians, for West Virginians:http://wv-www.net
> > Cocoa programming in Perl:http://camelbones.sourceforge.net
>
> There was a CPAN.pm file. I removed that. Now I see
>
> mkdir /home/mcca/.cpan/CPAN: Permission denied at /opt/perl_32/lib/
> 5.8.8/CPAN/HandleConfig.pm line 529
>
> It looks like there is some setting to make sure non sudo users can't
> use perl -MCPAN -e shell
>
> Which means that my co developers will not be able to use, I could be
> wrong. How do I change that?
>
> Also
>
> I just installed the latest CPAN.pm, the last line says
>
> 'YAML' not installed, will not store persistent state.
>
> what is this doing?
>
> Mike
>
> Mike
Lessons learned:
if you can't get into a perl shell from perl -MCPAN it may be from
the .cpan/CPAN.pm file. So you may not need to reinstall perl
The question I have is -- what commands are there to test a perl
configuration as appose to test a perl -MCPAN -e shell problem?
Anyone have a link to address this?
Well thanks everyone.
Mike
------------------------------
Date: Sat, 03 Nov 2007 18:28:09 -0400
From: Sherman Pendley <spamtrap@dot-app.org>
Subject: Re: Removing .cpan Directory
Message-Id: <m1d4urge12.fsf@dot-app.org>
mmccaws2 <mmccaws@comcast.net> writes:
> It looks like there is some setting to make sure non sudo users can't
> use perl -MCPAN -e shell
There is no such thing. You need root privileges if you're installing
modules in a directory for which such privs are needed - but that has
nothing at all to do with CPAN.
sherm--
--
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
------------------------------
Date: Sat, 03 Nov 2007 20:30:40 -0700
From: zigzagdna@yahoo.com
Subject: Weak references are not implemented in the version of perl at /tmp/replacebinary/Getopt/LL/DLList/Node.pm line 11
Message-Id: <1194147040.256617.181790@50g2000hsm.googlegroups.com>
On my UNIX Server, perl 5.8.0 in installed. When I enter command:
perl -X -U plbsed.pl
I get following error:
Weak references are not implemented in the version of perl at /tmp/
replacebinary/Getopt/LL/DLList/Node.pm line 11
BEGIN failed--compilation aborted at /tmp/replacebinary/Getopt/LL/
DLList/Node.pm line 11.
Compilation failed in require at /tmp/replacebinary/Getopt/LL/
DLList.pm line 11.
I do not know how to suppress this error despite reaidng many artcles
on google.
------------------------------
Date: Sun, 4 Nov 2007 06:01:55 +0000
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: Weak references are not implemented in the version of perl at /tmp/replacebinary/Getopt/LL/DLList/Node.pm line 11
Message-Id: <jr3005-tt5.ln1@osiris.mauzo.dyndns.org>
Quoth zigzagdna@yahoo.com:
> On my UNIX Server, perl 5.8.0 in installed. When I enter command:
> perl -X -U plbsed.pl
> I get following error:
> Weak references are not implemented in the version of perl at /tmp/
> replacebinary/Getopt/LL/DLList/Node.pm line 11
> BEGIN failed--compilation aborted at /tmp/replacebinary/Getopt/LL/
> DLList/Node.pm line 11.
> Compilation failed in require at /tmp/replacebinary/Getopt/LL/
> DLList.pm line 11.
>
> I do not know how to suppress this error despite reaidng many artcles
> on google.
You need to install the XS version of Scalar::Util. Make sure you have a
compiler installed, and that it is the one used to build your perl (if
it isn't, you will need to rebuild perl with this compiler), and then
reinstall Scalar::Util from CPAN.
Ben
------------------------------
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:
#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc. For subscription or unsubscription requests, send
#the single line:
#
# subscribe perl-users
#or:
# unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.
NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.
#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 1002
***************************************