[29758] in Perl-Users-Digest
Perl-Users Digest, Issue: 1001 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Nov 3 11:09:55 2007
Date: Sat, 3 Nov 2007 08:09:20 -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, 3 Nov 2007 Volume: 11 Number: 1001
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 <brian.d.foy@gmail.com>
Re: How Do You Tell Time in Perl? <1usa@llenroc.ude.invalid>
Re: How Do You Tell Time in Perl? <mmccaws@comcast.net>
Re: How to convert csv file to XML using XML::Simple? <jegan472@comcast.net>
Re: How to convert csv file to XML using XML::Simple? <jegan472@comcast.net>
Re: How to convert csv file to XML using XML::Simple? <mritty@gmail.com>
MIME::Lite or /bin/mail help please <bpatton@ti.com>
Re: MIME::Lite or /bin/mail help please <thepoet_nospam@arcor.de>
My Perl scripts don't run anymore <graham@letsgouk.com>
Re: My Perl scripts don't run anymore <1usa@llenroc.ude.invalid>
Re: My Perl scripts don't run anymore <graham@letsgouk.com>
new CPAN modules on Sat Nov 3 2007 (Randal Schwartz)
Removing .cpan Directory <mmccaws@comcast.net>
Re: Removing .cpan Directory <rkb@i.frys.com>
Re: Removing .cpan Directory <mmccaws@comcast.net>
Re: Removing .cpan Directory <spamtrap@dot-app.org>
Re: Removing .cpan Directory <mmccaws@comcast.net>
Re: Script to find largest files <m@rtij.nl.invlalid>
Re: Script to find largest files <hjp-usenet2@hjp.at>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 02 Nov 2007 19:49:28 -0700
From: mmccaws2 <mmccaws@comcast.net>
Subject: Re: !Help: can't get into perl -MCPAN -e shell
Message-Id: <1194058168.638297.119580@t8g2000prg.googlegroups.com>
On Nov 2, 8:10 am, "J. Gleixner" <glex_no-s...@qwest-spam-no.invalid>
wrote:
> mmccaws2 wrote:
> > On Nov 1, 4:32 pm, mmccaws2 <mmcc...@comcast.net> wrote:
> > Oh yes, we coordinated a reboot and the above output is even after the
> > reboot.
>
> Why would a reboot help? Do a re-build/re-install of perl, might as
> well make it the latest version, while you're at it.
>
> No idea how HP does things, but it should involve running make. Make
> sure you do the 'make test'.
>
> make
> make test ---> this should pass.. maybe a few warnings, but it should
> run and not give fatal errors.
> make install .. if the tests pass
>
> You probably want to do that on your test box or on one of your
> redundant servers first.
Well, reinstall perl,latest version my administrator could grab, which
we did, has not changed my ability to log into the perl shell. Must
be something in my .cpan directory. What happens if I blow that
away?????
Any thoughts!!!!!!
As to how she installs perl I think she is using a binary.
Mike.
------------------------------
Date: Sat, 03 Nov 2007 08:10:15 -0500
From: brian d foy <brian.d.foy@gmail.com>
Subject: Re: !Help: can't get into perl -MCPAN -e shell
Message-Id: <031120070810158050%brian.d.foy@gmail.com>
In article <1194058168.638297.119580@t8g2000prg.googlegroups.com>,
mmccaws2 <mmccaws@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.
>
------------------------------
Date: Sat, 03 Nov 2007 01:12:06 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: How Do You Tell Time in Perl?
Message-Id: <Xns99DCD7ABAB0B3asu1cornelledu@127.0.0.1>
kvnsmnsn@hotmail.com wrote in news:1194051494.309489.161940
@q5g2000prf.googlegroups.com:
> How can one tell what the time is in Perl,
You have asked a self-answering question (SAQ):
perldoc -f time
You can find more at http://www.ginini.com/perlsaq.html
> I know that I can find out how Perl works with the "perldoc" command,
perldoc perltoc
perldoc perlfaq
perldoc perlfunc
Do read the posting guidelines for this group.
Sinan
--
A. Sinan Unur <1usa@llenroc.ude.invalid>
(remove .invalid and reverse each component for email address)
clpmisc guidelines: <URL:http://www.augustmail.com/~tadmc/clpmisc.shtml>
------------------------------
Date: Fri, 02 Nov 2007 20:21:21 -0700
From: mmccaws2 <mmccaws@comcast.net>
Subject: Re: How Do You Tell Time in Perl?
Message-Id: <1194060081.046758.102670@z24g2000prh.googlegroups.com>
On Nov 2, 6:12 pm, "A. Sinan Unur" <1...@llenroc.ude.invalid> wrote:
> kvnsm...@hotmail.com wrote in news:1194051494.309489.161940
> @q5g2000prf.googlegroups.com:
>
> > How can one tell what the time is in Perl,
>
> You have asked a self-answering question (SAQ):
>
> perldoc -f time
>
> You can find more athttp://www.ginini.com/perlsaq.html
>
> > I know that I can find out how Perl works with the "perldoc" command,
>
> perldoc perltoc
> perldoc perlfaq
> perldoc perlfunc
>
> Do read the posting guidelines for this group.
>
> Sinan
>
> --
> A. Sinan Unur <1...@llenroc.ude.invalid>
> (remove .invalid and reverse each component for email address)
> clpmisc guidelines: <URL:http://www.augustmail.com/~tadmc/clpmisc.shtml>
It's always time to do perl
sorry no serious answer
------------------------------
Date: Sat, 03 Nov 2007 09:57:25 -0400
From: James Egan <jegan472@comcast.net>
Subject: Re: How to convert csv file to XML using XML::Simple?
Message-Id: <abCdnT0aPaPY47HanZ2dnUVZ_uWlnZ2d@comcast.com>
On Fri, 02 Nov 2007 11:42:10 +0000, Tad McClellan wrote:
> while ( <DATA> ) {
> chomp;
> my($first, $last, $adr) = split /,\s*/;
> print <<ENDCONTACT;
> <CONTACT>
> <FIRST_NAME>$first</<FIRST_NAME>
> <LAST_NAME>$last</LAST_NAME>
> <ADDRESS>$adr</ADDRESS>
> </CONTACT>
> ENDCONTACT
> };
>
>
> __DATA__
> Robert, Smith, 123 Main St.
> Jane, Smith, 456 Market St.
> William, Watson, 789 First Ave.
> --------------------------
Thanks. I found a really great module named XML::Generator. Most modules
like XML::Writer and XML::Simple use a .xml file for input, and then
output XML.
------------------------------
Date: Sat, 03 Nov 2007 09:58:07 -0400
From: James Egan <jegan472@comcast.net>
Subject: Re: How to convert csv file to XML using XML::Simple?
Message-Id: <abCdnTwaPaPy47HanZ2dnUVZ_uXinZ2d@comcast.com>
On Fri, 02 Nov 2007 03:55:11 -0700, Paul Lalli wrote:
> print XMLout($xml, RootName => "ADDRESS_BOOK", NoAttr => 1);
> __DATA__
> Robert, Smith, 123 Main St.
> Jane, Smith, 456 Market St.
> William, Watson, 789 First Ave
>
>
> Paul Lalli
Thanks. I found a really great module named XML::Generator. Most modules
like XML::Writer and XML::Simple use a .xml file for input, and then
output XML.
------------------------------
Date: Sat, 03 Nov 2007 07:58:20 -0700
From: Paul Lalli <mritty@gmail.com>
Subject: Re: How to convert csv file to XML using XML::Simple?
Message-Id: <1194101900.680022.122930@57g2000hsv.googlegroups.com>
On Nov 3, 9:58 am, James Egan <jegan...@comcast.net> wrote:
> On Fri, 02 Nov 2007 03:55:11 -0700, Paul Lalli wrote:
> > print XMLout($xml, RootName => "ADDRESS_BOOK", NoAttr => 1);
> > __DATA__
> > Robert, Smith, 123 Main St.
> > Jane, Smith, 456 Market St.
> > William, Watson, 789 First Ave
>
> > Paul Lalli
>
> Thanks. I found a really great module named XML::Generator.
> Most modules like XML::Writer and XML::Simple use a .xml file for
> input, and then output XML.
You're making no sense. XML::Simple, as I demonstrated above, does
not take *any* file for input. It takes a reference to a hash
structure, and then outputs XML.
Why are you bothering to thank me when you obviously didn't read my
post?
Paul Lalli
------------------------------
Date: Fri, 02 Nov 2007 14:21:03 -0500
From: Billy Patton <bpatton@ti.com>
Subject: MIME::Lite or /bin/mail help please
Message-Id: <fgftav$fv5$1@home.itg.ti.com>
I'm trying to get a weekly to be mailed through a cron job.
I have a perl scripts that creates an excel spread sheet.
I want to attach this spread sheet to some mail and send to my group as
my weekly report.
I cat find where I can do an attachment through /bin/mail do Ive tried
MIME::Lite.
What the code does now is that it will make the attachment and send
it,but when it gets there it is empty.
Here's what I have so far:
#!/usr/local/bin/perl
use strict;
use warnings;
use MIME::Lite;
require "ctime.pl";
my $date = ctime ( time );
my $file = '/home/bpatton/c014.report.xls';
chomp $date;
my $msg = MIME::Lite->new(
From => 'bpatton@ti.com' ,
To => 'bpatton@ti.com' ,
Subject => "Weekly from Billy Patton $date",
Type => 'multipart/mixed',
);
$msg->attach(Type => 'TEXT' ,
Data => "See attachment or look at $file" ,
);
$msg->attach(Type => 'AUTO' ,
Filename => $file,
Path => '/home/bpatton',
Disposition => 'attachment' ,
);
$msg->send;
------------------------------
Date: Sat, 03 Nov 2007 10:06:25 +0100
From: Christian Winter <thepoet_nospam@arcor.de>
Subject: Re: MIME::Lite or /bin/mail help please
Message-Id: <472c39cc$0$13103$9b4e6d93@newsspool2.arcor-online.net>
Billy Patton wrote:
> I'm trying to get a weekly to be mailed through a cron job.
> I have a perl scripts that creates an excel spread sheet.
> I want to attach this spread sheet to some mail and send to my group as
> my weekly report.
>
> I cat find where I can do an attachment through /bin/mail do Ive tried
> MIME::Lite.
>
> What the code does now is that it will make the attachment and send
> it,but when it gets there it is empty.
>
[...snipped...]
> $msg->attach(Type => 'AUTO' ,
> Filename => $file,
> Path => '/home/bpatton',
> Disposition => 'attachment' ,
> );
You've got the meaning of the parameters wrong.
Filename is, as the docs for MIME::Lite explain, the name that
will be suggested to the recipient (and can differ from the name
the file has on your local disk), whereas Path has to be the
complete local path to the file. In your case, it should look
like
$msg->attach( Type => 'AUTO',
Filename => 'c014.report.xls',
Path => $file,
Disposition => 'attachment'
);
HTH
-Chris
------------------------------
Date: Sat, 3 Nov 2007 14:31:05 -0000
From: "Graham Stow" <graham@letsgouk.com>
Subject: My Perl scripts don't run anymore
Message-Id: <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. Now, none of my Perl scipts run anymore - all that happens
is that the command prompt window is minimised and a Windows Wordpad window
containing my script, pops up. I'm running v5.8.6 on a W32 system. Can
anyone tell me what I've done and how I correct it? Instict tells me it
might have something to do with the use of the Getopt::Std module, but I
really don't know.
use Net::POP3;
use Net::SMTP;
use Getopt::Std;
getopts('q');
my ($host, $login, $password) = ('atuin', 'mcbmac', 'Tamsin');
my $server = Net::POP3->new($host, Debug => 99999);
warn "Couldn't connect to server $host" unless $server;
my $nomsgs = $server->login($login, $password);
die "Could not login" unless defined($nomsgs);
my $msglist = $server->list();
$nomsgs = keys %$msglist;
print "There are $nomsgs messages on $host\n";
foreach my $msg_id (keys %$msglist)
{
my $msgcontent = $server->get($msg_id);
forward($msgcontent, 'mc@mcwords.com', 'mc@mcwords.com');
}
$server->quit();
sub forward
{
my ($message, $from, $to) = @_;
$smtp = Net::SMTP->new('mail');
die "Couldn't open connection to server" unless $smtp;
$smtp->mail($from) or die "Bad 'from' address";
$smtp->to($to) or die "Bad 'to' address";
$smtp->data();
$smtp->datasend(join('',@$message));
die "Connection wouldn't accept data"
unless($smtp->dataend());
}
------------------------------
Date: Sat, 03 Nov 2007 14:39:57 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: My Perl scripts don't run anymore
Message-Id: <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).
> Now, none of my Perl scipts
> run anymore - all that happens is that the command prompt window is
> minimised and a Windows Wordpad window containing my script, pops up.
> I'm running v5.8.6 on a W32 system.
Your instinct is wrong. It sounds like you associated files with .pl
extension with Notepad.
Your question has nothing to do with Perl and everything to do with the
fact that you do not understand the basic features of the operating
system you are using.
You can manually fix the file associations or just uninstall and
reinstall ActiveState Perl to restore them for you.
Sinan
--
A. Sinan Unur <1usa@llenroc.ude.invalid>
(remove .invalid and reverse each component for email address)
clpmisc guidelines: <URL:http://www.augustmail.com/~tadmc/clpmisc.shtml>
------------------------------
Date: Sat, 3 Nov 2007 14:53:58 -0000
From: "Graham Stow" <graham@letsgouk.com>
Subject: Re: My Perl scripts don't run anymore
Message-Id: <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:
>
>> 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.
>
>> Now, none of my Perl scipts
>> run anymore - all that happens is that the command prompt window is
>> minimised and a Windows Wordpad window containing my script, pops up.
>> I'm running v5.8.6 on a W32 system.
>
> Your instinct is wrong. It sounds like you associated files with .pl
> extension with Notepad.
Everything was fine before I ran this script. Before when I double clicked
on a Perl script it opened in Wordpad, and it does so now, so nothing has
changed there
>
> Your question has nothing to do with Perl and everything to do with the
> fact that you do not understand the basic features of the operating
> system you are using.
>
> 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.
------------------------------
Date: Sat, 3 Nov 2007 04:42:16 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Sat Nov 3 2007
Message-Id: <JqwyEG.23u9@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.
Business-OnlinePayment-PlugnPay-0.02
http://search.cpan.org/~jef/Business-OnlinePayment-PlugnPay-0.02/
plugnpay backend for Business::OnlinePayment
----
Business-TW-TSIB-CStorePayment-0.01
http://search.cpan.org/~clkao/Business-TW-TSIB-CStorePayment-0.01/
Module for Taishin Bank Convenient Store Payment Management
----
Class-Accessor-Complex-0.11
http://search.cpan.org/~marcel/Class-Accessor-Complex-0.11/
arrays, hashes, booleans, integers, sets and more
----
Compress-LZF-1.9
http://search.cpan.org/~mlehmann/Compress-LZF-1.9/
extremely light-weight Lempel-Ziv-Free compression
----
Config-INI-0.009
http://search.cpan.org/~rjbs/Config-INI-0.009/
simple .ini-file format, along with reader/writer
----
Data-OptList-0.103
http://search.cpan.org/~rjbs/Data-OptList-0.103/
parse and validate simple name/value option pairs
----
DateTime-TimeZone-0.6901
http://search.cpan.org/~drolsky/DateTime-TimeZone-0.6901/
Time zone object base class and factory
----
GD-Chart-Radial-0.07
http://search.cpan.org/~barbie/GD-Chart-Radial-0.07/
plot and output Radial or Radar charts using the GD library.
----
IPC-Run3-0.039
http://search.cpan.org/~rjbs/IPC-Run3-0.039/
run a subprocess in batch mode (a la system) on Unix, Win32, etc.
----
Log-Dispatch-2.19
http://search.cpan.org/~drolsky/Log-Dispatch-2.19/
Dispatches messages to one or more outputs
----
Log-Dispatch-2.20
http://search.cpan.org/~drolsky/Log-Dispatch-2.20/
Dispatches messages to one or more outputs
----
Log-Report-0.14
http://search.cpan.org/~markov/Log-Report-0.14/
report a problem, pluggable handlers and language support
----
Logfile-EPrints-1.17
http://search.cpan.org/~timbrody/Logfile-EPrints-1.17/
Process Web log files for institutional repositories
----
Mail-Audit-2.222
http://search.cpan.org/~rjbs/Mail-Audit-2.222/
Library for creating easy mail filters
----
Mail-Audit-List-1.852
http://search.cpan.org/~rjbs/Mail-Audit-List-1.852/
Mail::Audit plugin for automatic list delivery
----
MooseX-Iterator-0.07
http://search.cpan.org/~rlb/MooseX-Iterator-0.07/
Iterate over collections
----
Net-Libnet-0.01_04
http://search.cpan.org/~smpeters/Net-Libnet-0.01_04/
Perl interface to libnet
----
Object-InsideOut-3.27
http://search.cpan.org/~jdhedden/Object-InsideOut-3.27/
Comprehensive inside-out object support module
----
Parse-Marpa-0.001_029
http://search.cpan.org/~jkegl/Parse-Marpa-0.001_029/
Jay Earley's general parsing algorithm with LR(0) precomputation
----
Parse-Marpa-0.001_030
http://search.cpan.org/~jkegl/Parse-Marpa-0.001_030/
Jay Earley's general parsing algorithm with LR(0) precomputation
----
PerlSpeak-1.50
http://search.cpan.org/~jkamphaus/PerlSpeak-1.50/
Perl Module for text to speech with festival, cepstral and others.
----
Pugs-Compiler-Rule-0.28
http://search.cpan.org/~agent/Pugs-Compiler-Rule-0.28/
Compiler for Perl 6 regexes
----
SMS-Send-US-SprintPCS-0.03
http://search.cpan.org/~jjore/SMS-Send-US-SprintPCS-0.03/
An SMS::Send driver for the messaging.sprintpcs.com website
----
SQL-Bibliosoph-1.3
http://search.cpan.org/~matiu/SQL-Bibliosoph-1.3/
A SQL Statements Library
----
TeX-Encode-1.1
http://search.cpan.org/~timbrody/TeX-Encode-1.1/
Encode/decode Perl utf-8 strings into TeX
----
Test-Lazy-0.050_1
http://search.cpan.org/~rkrimen/Test-Lazy-0.050_1/
A quick and easy way to compose and run tests with useful output.
----
Test-Lazy-0.050_2
http://search.cpan.org/~rkrimen/Test-Lazy-0.050_2/
A quick and easy way to compose and run tests with useful output.
----
Test-WWW-Declare-0.01
http://search.cpan.org/~sartak/Test-WWW-Declare-0.01/
declarative testing for your web app
----
Test-YAML-Meta-0.05
http://search.cpan.org/~barbie/Test-YAML-Meta-0.05/
Validation of the META.yml file in a distribution.
----
Text-CSV_PP-1.06
http://search.cpan.org/~makamaka/Text-CSV_PP-1.06/
comma-separated values manipulation routines (PP version)
----
Text-UpsideDown-0.01
http://search.cpan.org/~marcel/Text-UpsideDown-0.01/
flip text upside-down using Unicode
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: Fri, 02 Nov 2007 19:54:17 -0700
From: mmccaws2 <mmccaws@comcast.net>
Subject: Removing .cpan Directory
Message-Id: <1194058457.545068.280850@k35g2000prh.googlegroups.com>
What happens if one remove .cpan directory in the home directory. I'm
locked out of the perl shell, reinstalled perl, and still can't
perl -e shell
This symptom seems to have isolated the problem to my configuration.
Mike
------------------------------
Date: Fri, 02 Nov 2007 21:30:14 -0700
From: Ron Bergin <rkb@i.frys.com>
Subject: Re: Removing .cpan Directory
Message-Id: <1194064214.343683.156010@y27g2000pre.googlegroups.com>
On Nov 2, 7:54 pm, mmccaws2 <mmcc...@comcast.net> wrote:
> What happens if one remove .cpan directory in the home directory. I'm
> locked out of the perl shell, reinstalled perl, and still can't
> perl -e shell
>
> This symptom seems to have isolated the problem to my configuration.
>
> Mike
Do you mean the cpan shell?
try
perl -MCPAN -e shell
------------------------------
Date: Fri, 02 Nov 2007 23:23:13 -0700
From: mmccaws2 <mmccaws@comcast.net>
Subject: Re: Removing .cpan Directory
Message-Id: <1194070993.841242.306860@i13g2000prf.googlegroups.com>
On Nov 2, 9:30 pm, Ron Bergin <r...@i.frys.com> wrote:
> On Nov 2, 7:54 pm, mmccaws2 <mmcc...@comcast.net> wrote:
>
> > What happens if one remove .cpan directory in the home directory. I'm
> > locked out of the perl shell, reinstalled perl, and still can't
> > perl -e shell
>
> > This symptom seems to have isolated the problem to my configuration.
>
> > Mike
>
> Do you mean the cpan shell?w
>
> try
>
> perl -MCPAN
When I try that command and similar ones, I'm rejected. So I thought
perl was corrupted. But after reinstalling perl, I still can't log
into the shell. Error messages reflect a module install error output
that I was doing when my connection got disrupted.
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?
Mike
------------------------------
Date: Sat, 03 Nov 2007 09:10:43 -0400
From: Sherman Pendley <spamtrap@dot-app.org>
Subject: Re: Removing .cpan Directory
Message-Id: <m1k5ozh3u4.fsf@dot-app.org>
mmccaws2 <mmccaws@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
------------------------------
Date: Sat, 03 Nov 2007 07:20:56 -0700
From: mmccaws2 <mmccaws@comcast.net>
Subject: Re: Removing .cpan Directory
Message-Id: <1194099656.150279.150250@v23g2000prn.googlegroups.com>
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
------------------------------
Date: Sat, 3 Nov 2007 10:42:21 +0100
From: Martijn Lievaart <m@rtij.nl.invlalid>
Subject: Re: Script to find largest files
Message-Id: <pan.2007.11.03.09.42.21@rtij.nl.invlalid>
On Fri, 02 Nov 2007 14:05:15 +0000, bugbear wrote:
> groups.user@gmail.com wrote:
>> Hi Script Gurus..
>>
>> i'm looking for a script to find the largest files in a filesystem,
>> ordered by size.
>>
>>
> du -s /* | sort -rn
Won't work, will not find hidden files. I normaly use (from memory):
find / -mindepth 1 -maxdepth 1 -print0 | xargs -0 du -s | sort -rn
M4
------------------------------
Date: Sat, 3 Nov 2007 12:39:41 +0100
From: "Peter J. Holzer" <hjp-usenet2@hjp.at>
Subject: Re: Script to find largest files
Message-Id: <slrnfionft.339.hjp-usenet2@zeno.hjp.at>
On 2007-11-03 09:42, Martijn Lievaart <m@rtij.nl.invlalid> wrote:
> On Fri, 02 Nov 2007 14:05:15 +0000, bugbear wrote:
>
>> groups.user@gmail.com wrote:
>>> i'm looking for a script to find the largest files in a filesystem,
>>> ordered by size.
>>>
>>>
>> du -s /* | sort -rn
>
> Won't work, will not find hidden files. I normaly use (from memory):
>
> find / -mindepth 1 -maxdepth 1 -print0 | xargs -0 du -s | sort -rn
Why are you all intent on using du? It does something completely
different:
% find / -mindepth 1 -maxdepth 1 -print0 | xargs -0 du -s | sort -rn
6882520 /home
2778612 /usr
1021384 /var
134588 /lib
26692 /boot
[...]
/home is not the largest file on my root filesystem. In fact it isn't on
my root filesystem at all.
The correct solution is:
find $mountpoint -xdev -printf "%s %p\n" | sort -rn
(-printf is an extension of GNU find, but so is -print0. You may also
throw a -type f in there if you are only interested in regular files)
Since this is a perl group, not a shell group, here's the equivalent
script in perl:
#!/usr/bin/perl
use warnings;
use strict;
use File::Find;
my %files;
find(\&wanted, $ARGV[0]);
for (sort { $files{$b} <=> $files{$a} } keys %files) {
print "$files{$_} $_\n";
}
sub wanted {
my ($dev, $ino, $mode, $nlink, $uid, $gid, $rdev, $size) = lstat($_);
if ($dev != $File::Find::topdev) {
$File::Find::prune = 1;
return;
}
$files{$File::Find::name} = $size;
}
__END__
Which is quite a bit larger but should be OS independent and even deals
correctly with filenames with embedded newlines.
hp
--
_ | Peter J. Holzer | It took a genius to create [TeX],
|_|_) | Sysadmin WSR | and it takes a genius to maintain it.
| | | hjp@hjp.at | That's not engineering, that's art.
__/ | http://www.hjp.at/ | -- David Kastrup in comp.text.tex
------------------------------
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 1001
***************************************