[31237] in Perl-Users-Digest
Perl-Users Digest, Issue: 2482 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jun 18 16:09:46 2009
Date: Thu, 18 Jun 2009 13:09:08 -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 Thu, 18 Jun 2009 Volume: 11 Number: 2482
Today's topics:
Re: Debugging a Perl(SNMP-NPAdmin) module - Not able to <dkarthik@gmail.com>
Re: Debugging a Perl(SNMP-NPAdmin) module - Not able to <ben@morrow.me.uk>
new CPAN modules on Thu Jun 18 2009 (Randal Schwartz)
Perl WTF <newsy-lech@totrzebawyciac.gazeta.sky.pl>
Re: Perl WTF <sisyphus359@gmail.com>
Re: Perl WTF (Randal L. Schwartz)
Re: Perl WTF <smallpond@juno.com>
Re: Perl WTF <ben@morrow.me.uk>
Re: Perl WTF <cartercc@gmail.com>
Re: Perl WTF <tadmc@seesig.invalid>
Re: Perl WTF <cartercc@gmail.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 18 Jun 2009 05:16:02 -0700 (PDT)
From: karthikd <dkarthik@gmail.com>
Subject: Re: Debugging a Perl(SNMP-NPAdmin) module - Not able to understand few LOC
Message-Id: <3e1b393d-c08d-4016-9994-da12835a4859@c18g2000prh.googlegroups.com>
On Jun 18, 12:35=A0am, Tad J McClellan <ta...@seesig.invalid> wrote:
> karthikd <dkart...@gmail.com> wrote:
> > =A0 =A0 /^HP$/ && do {
> > =A0 =A0 =A0 =A0 my $str=3D $self->{Neon}->hp_gdStatusId()->{gdStatusId}=
;
> > =A0 =A0 =A0 =A0 print "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX: $str \n";
> > I added the print statement to know what value is stored in $str.
> > While running the module, =A0we found that $str value is empty.
>
> Did you have warnings enabled?
>
> It would help to know if it really contains the empty string
> versus containing undef.
>
> > My query is what the line below:
>
> > =A0 =A0 =A0my $str=3D $self->{Neon}->hp_gdStatusId()->{gdStatusId};
>
> > does really and how to troubleshoot/debug it in a failure case.
>
> If it is really the empty string, then it would seem that
> the error was in storing the value rather than retrieving it.
>
> It it is really undef, then you can "walk" the chain to figure out
> where it was broken:
>
> =A0 =A0 warn "self\n" unless defined $self;
> =A0 =A0 warn "Neon\n" unless defined $self->{Neon};
> =A0 =A0 warn "hp_gdStatusId\n" unless defined $self->{Neon}->hp_gdStatusI=
d();
> =A0 =A0 warn "gdStatusId\n" unless defined $str;
>
>
>
>
>
> > hp_gdStatusId seems to be a key in a hash called %list_map defined in
> > another perl module called in Neon.pm
>
> > =A0 =A0 =A0%list_map=3D (
> > # =A0 =A0 =A0 sub name =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0oid list
> > # =A0 =A0 =A0 -------- =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0-=
-------
> > =A0 =A0 =A0 =A0 hp_npCfgSource =A0 =A0 =A0 =A0 =A0=3D> =A0 =A0 =A0[ 0x0=
,
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
=A0 =A0 [ q:
>
> > [ '.iso.org.dod.internet.private.enterprises.hp.nm.interface.npCard.npC=
fg.npC=ADfgSource',
> > 0],
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
=A0 =A0 : ],
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
=A0 =A0 ],
> > =A0 =A0 =A0 =A0 hp_gdStatusId =A0 =A0 =A0 =A0 =A0 =3D> =A0 =A0 =A0[ 0x0=
,
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
=A0 =A0 [ q:
>
> > [ '.iso.org.dod.internet.private.enterprises.hp.nm.system.net-
> > peripheral.net-printer.generalDeviceStatus.gdStatusId', 0]
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
=A0 =A0 : ],
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
=A0 =A0 ],
> > =A0 =A0 =A0 =A0 );
>
> use Data::Dumper to see what complex data structures look like:
>
> =A0 =A0use Data::Dumper;
> =A0 =A0warn Dumper \%list_map;
>
> --
> Tad McClellan
> email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"- Hid=
e quoted text -
>
> - Show quoted text -
Hi Tad,
Thanks for your help. I added the warning statements as mentioned and
found that
warn "gdStatusId\n" unless defined $str;
returned "gdStatusId" proving that $str was undefined. It looks like
{gdStatusId} seems to be undefined. On Dumping the object $self->
{Neon} we found that, it lists a complex structure and the correct
value we were looking for had the key value as "0", instead of
gdStatusId.
So, for time being we had changed the code to something like this:
my $str=3D $self->{Neon}->hp_gdStatusId()->{0};
I am not sure this is a correct way. My one more doubt is, I couldn't
find gdStatusId as key anywhere in the code(I checked all the .pm
files).
Is it that hash keys can be generated dynamically in Perl ??
Well, IMHO troubleshooting a Perl code is way complex than debugging C
programs.
Once again thanks for all your insights. My learning is enhanced.
Thanks & Regards,
Karthik
------------------------------
Date: Thu, 18 Jun 2009 00:04:45 +0100
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: Debugging a Perl(SNMP-NPAdmin) module - Not able to understand few LOC
Message-Id: <dd9og6-aed.ln1@osiris.mauzo.dyndns.org>
Quoth Tad J McClellan <tadmc@seesig.invalid>:
> karthikd <dkarthik@gmail.com> wrote:
>
> > My query is what the line below:
> >
> > my $str= $self->{Neon}->hp_gdStatusId()->{gdStatusId};
> >
> > does really and how to troubleshoot/debug it in a failure case.
>
>
> If it is really the empty string, then it would seem that
> the error was in storing the value rather than retrieving it.
>
> It it is really undef, then you can "walk" the chain to figure out
> where it was broken:
>
> warn "self\n" unless defined $self;
> warn "Neon\n" unless defined $self->{Neon};
> warn "hp_gdStatusId\n" unless defined $self->{Neon}->hp_gdStatusId();
> warn "gdStatusId\n" unless defined $str;
Um, if $self or ->{Neon} were undef the method call would have croaked.
I would try separating out the calls
my $status = $self->{Neon}->hp_gdStatusId;
$status or die "can't get Neon status ID";
my $str = $status->{gdStatusId};
and then checking the docs for whatever class the ->{Neon} object
belongs to to see why ->hd_gdStatusId might be returning undef. It may
well provide some sort of ->error method that will tell you what went
wrong.
Ben
------------------------------
Date: Thu, 18 Jun 2009 04:42:27 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Thu Jun 18 2009
Message-Id: <KLF3qr.22wB@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.
AIX-SysInfo-1.1.1
http://search.cpan.org/~sleonov/AIX-SysInfo-1.1.1/
A Perl module for retrieving information about an AIX pSeries system
----
AIX-SysInfo-1.2
http://search.cpan.org/~sleonov/AIX-SysInfo-1.2/
A Perl module for retrieving information about an AIX pSeries system
----
Acme-PDF-rescale-0.1
http://search.cpan.org/~herve/Acme-PDF-rescale-0.1/
A stupid module just to get trained with CPAN.
----
Audio-Scan-0.21
http://search.cpan.org/~agrundma/Audio-Scan-0.21/
XS parser for MP3, MP4, Ogg Vorbis, FLAC, ASF, WAV, AIFF, Musepack, Monkey's Audio
----
B-Foreach-Iterator-0.05
http://search.cpan.org/~gfuji/B-Foreach-Iterator-0.05/
Manipulates foreach iterators
----
Catalyst-Controller-reCAPTCHA-0.4
http://search.cpan.org/~zarquon/Catalyst-Controller-reCAPTCHA-0.4/
authenticate people and read books!
----
Catalyst-Helper-AuthDBIC-0.09
http://search.cpan.org/~zarquon/Catalyst-Helper-AuthDBIC-0.09/
(EXPERIMENTAL)
----
Catalyst-Model-DBIC-Schema-QueryLog-0.10
http://search.cpan.org/~fayland/Catalyst-Model-DBIC-Schema-QueryLog-0.10/
(DEPERCATED) DBIx::Class::QueryLog Model Class
----
Catalyst-TraitFor-Model-DBIC-Schema-QueryLog-0.01
http://search.cpan.org/~fayland/Catalyst-TraitFor-Model-DBIC-Schema-QueryLog-0.01/
DBIx::Class::QueryLog support for Catalyst::Model::DBIC::Schema
----
Catalyst-TraitFor-Model-DBIC-Schema-QueryLog-0.02
http://search.cpan.org/~fayland/Catalyst-TraitFor-Model-DBIC-Schema-QueryLog-0.02/
DBIx::Class::QueryLog support for Catalyst::Model::DBIC::Schema
----
Config-Tree-0.01
http://search.cpan.org/~sharyanto/Config-Tree-0.01/
Access various configuration as a single Unix filesystem-like tree
----
Data-PrefixMerge-0.03
http://search.cpan.org/~sharyanto/Data-PrefixMerge-0.03/
Merge two nested data structures, with merging mode prefix on hash keys
----
Data-PrefixMerge-0.04
http://search.cpan.org/~sharyanto/Data-PrefixMerge-0.04/
Merge two nested data structures, with merging mode prefix on hash keys
----
Data-Schema-0.05
http://search.cpan.org/~sharyanto/Data-Schema-0.05/
Validate nested data structures with nested structure
----
Digest-MD6-0.03
http://search.cpan.org/~andya/Digest-MD6-0.03/
Perl interface to the MD6 Algorithm
----
Digest-MD6-0.05
http://search.cpan.org/~andya/Digest-MD6-0.05/
Perl interface to the MD6 Algorithm
----
Digest-MD6-0.06
http://search.cpan.org/~andya/Digest-MD6-0.06/
Perl interface to the MD6 Algorithm
----
Digest-MD6-0.07
http://search.cpan.org/~andya/Digest-MD6-0.07/
Perl interface to the MD6 Algorithm
----
Digest-OAT-0.04
http://search.cpan.org/~mbailey/Digest-OAT-0.04/
Bob Jenkin's One-at-a-Time hash function
----
Email-Sender-Transport-SMTP-TLS-0.03
http://search.cpan.org/~fayland/Email-Sender-Transport-SMTP-TLS-0.03/
Email::Sender with Net::SMTP::TLS (Eg. Gmail)
----
ExtUtils-XSpp-0.01
http://search.cpan.org/~mbarbon/ExtUtils-XSpp-0.01/
XS for C++
----
Fedora-App-MaintainerTools-0.001
http://search.cpan.org/~rsrchboy/Fedora-App-MaintainerTools-0.001/
----
File-Map-0.16
http://search.cpan.org/~leont/File-Map-0.16/
Memory mapping made simple and safe.
----
Gtk2-Ex-TimeEntry-0.04
http://search.cpan.org/~jhallock/Gtk2-Ex-TimeEntry-0.04/
Widget for entering times
----
HTTP-Proxy-Selective-0.003
http://search.cpan.org/~bobtfish/HTTP-Proxy-Selective-0.003/
Simple HTTP Proxy which serves some paths from locations on local disk.
----
Hash-FieldHash-0.08
http://search.cpan.org/~gfuji/Hash-FieldHash-0.08/
A lightweight field hash implementation
----
Image-MetaData-JPEG-0.152
http://search.cpan.org/~bettelli/Image-MetaData-JPEG-0.152/
Perl extension for showing/modifying JPEG (meta)data.
----
Imager-ExifOrientation-0.03
http://search.cpan.org/~yappo/Imager-ExifOrientation-0.03/
A picture is rotated using Orientation of Exif
----
JSON-Tiny-0.1.0
http://search.cpan.org/~moritz/JSON-Tiny-0.1.0/
----
JSON-Tiny-0.1.1
http://search.cpan.org/~moritz/JSON-Tiny-0.1.1/
----
KSx-Search-WildCardQuery-0.05
http://search.cpan.org/~sprout/KSx-Search-WildCardQuery-0.05/
Wild card query class for KinoSearch
----
MIME-Charset-1.007.1
http://search.cpan.org/~nezumi/MIME-Charset-1.007.1/
Charset Informations for MIME
----
MIME-EncWords-1.011.1
http://search.cpan.org/~nezumi/MIME-EncWords-1.011.1/
deal with RFC 2047 encoded words (improved)
----
MediaWiki-Bot-2.2.4
http://search.cpan.org/~dcollins/MediaWiki-Bot-2.2.4/
a Wikipedia bot framework written in Perl
----
Module-Build-Functions-0.001_009
http://search.cpan.org/~csjewell/Module-Build-Functions-0.001_009/
Module::Install style syntax for Module::Build
----
MooseX-Workers-0.07
http://search.cpan.org/~jhannah/MooseX-Workers-0.07/
Provides a simple sub-process management for asynchronous tasks.
----
Muldis-D-0.79.1
http://search.cpan.org/~duncand/Muldis-D-0.79.1/
Formal spec of Muldis D relational DBMS lang
----
MyCPAN-Indexer-1.24
http://search.cpan.org/~bdfoy/MyCPAN-Indexer-1.24/
Index a Perl distribution
----
NLP-GATE-0.1
http://search.cpan.org/~johannp/NLP-GATE-0.1/
Handle GATE documents and annotations
----
Net-Amazon-0.54
http://search.cpan.org/~boumenot/Net-Amazon-0.54/
Framework for accessing amazon.com via REST
----
Net-Async-HTTP-0.04
http://search.cpan.org/~pevans/Net-Async-HTTP-0.04/
Asynchronous HTTP user agent
----
Net-FTP-Robust-0.01
http://search.cpan.org/~markov/Net-FTP-Robust-0.01/
download files over FTP
----
Net-IMAP-Server-1.18
http://search.cpan.org/~alexmv/Net-IMAP-Server-1.18/
A single-threaded multiplexing IMAP server implementation, using Net::Server::Coro.
----
Net-IMAP-Simple-1.1899_05
http://search.cpan.org/~jettero/Net-IMAP-Simple-1.1899_05/
Perl extension for simple IMAP account handling.
----
Net-SFTP-Foreign-1.52_09
http://search.cpan.org/~salva/Net-SFTP-Foreign-1.52_09/
SSH File Transfer Protocol client
----
Net-Stomp-Receipt-0.36
http://search.cpan.org/~huguei/Net-Stomp-Receipt-0.36/
An extension to Net::Stomp (STOMP client) to allow transactional sends.
----
PDF-Report-1.33
http://search.cpan.org/~aorr/PDF-Report-1.33/
A wrapper written for PDF::API2
----
POE-Filter-HTTP-Parser-1.02
http://search.cpan.org/~bingos/POE-Filter-HTTP-Parser-1.02/
A HTTP POE filter for HTTP clients or servers
----
Parallel-Depend-4.08
http://search.cpan.org/~lembark/Parallel-Depend-4.08/
: Parallel-dependent dispatch of perl or shell code.
----
Perl-Tidy-20090616
http://search.cpan.org/~shancock/Perl-Tidy-20090616/
Parses and beautifies perl source
----
RDF-Simple-0.413
http://search.cpan.org/~mthurn/RDF-Simple-0.413/
read and write RDF without complication
----
REST-Client-95
http://search.cpan.org/~mcrawfor/REST-Client-95/
A simple client for interacting with RESTful http/https resources
----
RPC-XML-0.65
http://search.cpan.org/~rjray/RPC-XML-0.65/
A set of classes for core data, message and XML handling
----
RT-Extension-MenubarUserTickets-1.0
http://search.cpan.org/~dumb/RT-Extension-MenubarUserTickets-1.0/
----
RT-Extension-PriorityAsString-0.01
http://search.cpan.org/~falcone/RT-Extension-PriorityAsString-0.01/
show priorities in RT as strings instead of numbers
----
Scalar-Alias-0.06
http://search.cpan.org/~gfuji/Scalar-Alias-0.06/
Perl extention to declare lexical scalar aliases
----
Syntax-Highlight-Perl6-0.60
http://search.cpan.org/~azawawi/Syntax-Highlight-Perl6-0.60/
Perl 6 Syntax Highlighter
----
Task-Twitter-0.01
http://search.cpan.org/~leto/Task-Twitter-0.01/
Install modules relating to Twitter
----
Test-POE-Client-TCP-1.04
http://search.cpan.org/~bingos/Test-POE-Client-TCP-1.04/
A POE Component providing TCP client services for test cases
----
Time-Format-1.10
http://search.cpan.org/~roode/Time-Format-1.10/
Easy-to-use date/time formatting.
----
UR-0.8
http://search.cpan.org/~sakoht/UR-0.8/
rich declarative non-hierarchical transactional objects
----
Verilog-Perl-3.211
http://search.cpan.org/~wsnyder/Verilog-Perl-3.211/
----
WWW-CBF-0.01
http://search.cpan.org/~garu/WWW-CBF-0.01/
Brazilian Football Championship status
----
ZConf-Mail-1.0.1
http://search.cpan.org/~vvelox/ZConf-Mail-1.0.1/
Misc mail client functions backed by ZConf.
----
ZConf-Mail-1.1.0
http://search.cpan.org/~vvelox/ZConf-Mail-1.1.0/
Misc mail client functions backed by ZConf.
----
autovivification-0.02
http://search.cpan.org/~vpit/autovivification-0.02/
Lexically disable autovivification.
----
cnutt-feed-1.21
http://search.cpan.org/~iderrick/cnutt-feed-1.21/
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/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion
------------------------------
Date: Thu, 18 Jun 2009 13:37:00 +0200
From: Lech <newsy-lech@totrzebawyciac.gazeta.sky.pl>
Subject: Perl WTF
Message-Id: <h1d9f2$igb$1@nemesis.news.neostrada.pl>
Hello,
I am collecting perl WTFs (What the f***)- not poorly written code, by WTFs
in perl itself.
Did you have that experience, when you programmed in perl and something
worked other way than you thought it should? Or other perl strange things?
--
Regards, Lech
------------------------------
Date: Thu, 18 Jun 2009 06:56:16 -0700 (PDT)
From: sisyphus <sisyphus359@gmail.com>
Subject: Re: Perl WTF
Message-Id: <fb52af86-0341-4e19-87a9-2a4988945393@k19g2000prh.googlegroups.com>
On Jun 18, 9:37=A0pm, Lech <newsy-l...@totrzebawyciac.gazeta.sky.pl>
wrote:
> Did you have that experience, when you programmed in perl and something
> worked other way than you thought it should?
That the following 3 one-liners don't *all* output "ARRAY" will always
get a "WTF ?" out of me:
C:\_32\C>perl -e "print ref [1,2,3]"
ARRAY
C:\_32\C>perl -e "@x=3D(1,2,3);print ref \@x"
ARRAY
C:\_32\C>perl -e "print ref \(1,2,3)"
SCALAR
It's documented, of course, and there's an element of convenience with
having \(1,2,3) being synonymous with (\1,\2,\3) - but it's just so
damned illogical :-)
Cheers,
Rob
------------------------------
Date: Thu, 18 Jun 2009 07:46:38 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: Perl WTF
Message-Id: <86eith8ur5.fsf@blue.stonehenge.com>
>>>>> "Lech" == Lech <newsy-lech@totrzebawyciac.gazeta.sky.pl> writes:
Lech> I am collecting perl WTFs (What the f***)- not poorly written code, by WTFs
Lech> in perl itself.
Just as a curiousity, or as some burn piece you're writing about how
Perl sucks compared to other things?
Would be nice to know the context.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion
------------------------------
Date: Thu, 18 Jun 2009 09:03:59 -0700 (PDT)
From: smallpond <smallpond@juno.com>
Subject: Re: Perl WTF
Message-Id: <4f849dbe-e7aa-45d6-a824-e7532fb083c6@q37g2000vbi.googlegroups.com>
On Jun 18, 7:37=A0am, Lech <newsy-l...@totrzebawyciac.gazeta.sky.pl>
wrote:
> Hello,
>
> I am collecting perl WTFs (What the f***)- not poorly written code, by WT=
Fs
> in perl itself.
>
> Did you have that experience, when you programmed in perl and something
> worked other way than you thought it should? Or other perl strange things=
?
>
My favorite is that Perl has three (not four!) choices for
scalar numeric/boolean combinations: 0, 1 and "0 but true".
The only self-documenting WTF.
------------------------------
Date: Thu, 18 Jun 2009 17:41:55 +0100
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: Perl WTF
Message-Id: <jb7qg6-l9q.ln1@osiris.mauzo.dyndns.org>
Quoth Lech <newsy-lech@totrzebawyciac.gazeta.sky.pl>:
>
> I am collecting perl WTFs (What the f***)- not poorly written code, by WTFs
> in perl itself.
>
> Did you have that experience, when you programmed in perl and something
> worked other way than you thought it should? Or other perl strange things?
STDOUT->autoflush(1);
seems pretty WTF to me, especially when you compare it with
sub STDOUT { ["WTF"] }
STDOUT->[0];
Also
use IO::Handle;
sub foo { 1; }
foo IO::Handle->new;
and every other situation where dative-object syntax sticks its nose in
where it's not wanted.
Ben
------------------------------
Date: Thu, 18 Jun 2009 09:52:26 -0700 (PDT)
From: ccc31807 <cartercc@gmail.com>
Subject: Re: Perl WTF
Message-Id: <d3d2e408-c307-4248-8582-e82673139634@n8g2000vbb.googlegroups.com>
On Jun 18, 10:46=A0am, mer...@stonehenge.com (Randal L. Schwartz) wrote:
> Just as a curiousity, or as some burn piece you're writing about how
> Perl sucks compared to other things?
I think the point is that Perl has idiosyncratic features, things that
other languages do differently and you wouldn't expect if you were
thinking Other Language while writing Perl.
Besides, Perl sucks even NOT compared to other things -- as all
languages do. This is simply a recognition that there isn't a perfect
language.*
This isn't a criticism of Perl, just the nature of languages. For me,
Perl sucks less than other languages that I've used, such as C or
Java. In fact, I'd say that Perl sucks a lot less than Java, and way
less than C.
CC
*Well, maybe Lisp, by reputation, but maybe people don't use Lisp
because it /is/ a perfect language, and its WTF factor is very high.
------------------------------
Date: Thu, 18 Jun 2009 13:08:13 -0500
From: Tad J McClellan <tadmc@seesig.invalid>
Subject: Re: Perl WTF
Message-Id: <slrnh3l0gg.nrl.tadmc@tadmc30.sbcglobal.net>
ccc31807 <cartercc@gmail.com> wrote:
> For me,
> Perl sucks less than other languages that I've used, such as C or
> Java. In fact, I'd say that Perl sucks a lot less than Java, and way
> less than C.
When I'm asked for a comparison (and often even when I'm not)
I usually respond with:
Using Perl is like digging a ditch with a backhoe.
Using C is like digging a ditch with a shovel.
Using Java is like digging a ditch with a spoon.
Followed by,
Use the Right Tool for the job.
If there might be a gas line there, then use a shovel.
If there might be artifacts there, then use a spoon.
Else use a backhoe.
--
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"
------------------------------
Date: Thu, 18 Jun 2009 11:39:33 -0700 (PDT)
From: ccc31807 <cartercc@gmail.com>
Subject: Re: Perl WTF
Message-Id: <d1cd1c57-04ca-4684-8663-e6e4ef48512b@u10g2000vbd.googlegroups.com>
On Jun 18, 2:08=A0pm, Tad J McClellan <ta...@seesig.invalid> wrote:
> When I'm asked for a comparison (and often even when I'm not)
> I usually respond with:
> =A0 =A0 Using Perl is like digging a ditch with a backhoe.
> =A0 =A0 Using C is like digging a ditch with a shovel.
> =A0 =A0 Using Java is like digging a ditch with a spoon.
>
> Followed by,
> =A0 =A0 Use the Right Tool for the job.
> =A0 =A0 If there might be a gas line there, then use a shovel.
> =A0 =A0 If there might be artifacts there, then use a spoon.
> =A0 =A0 Else use a backhoe.
Absolutely!
When I'm asked for a comparison (and often even when I'm not)
I usually respond with:
When you have nails, use a hammer.
When you have screws, use a screwdriver.
When you have bolts, use a wrench.
(My take on the OP is that a WTF factor will arise when you try to
twist a nail with a hammer, or hit a screw with a screwdriver, and it
doesn't work. You can drive nails with a screwdriver and drive screws
with a hammer, and I've done both, but you're better off using the
right tool for the job.)
CC
------------------------------
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 2482
***************************************