[29056] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 300 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Apr 4 06:09:44 2007

Date: Wed, 4 Apr 2007 03: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           Wed, 4 Apr 2007     Volume: 11 Number: 300

Today's topics:
    Re: Can't change filenames..why? <edMbj@aes-intl.com>
    Re: Can't change filenames..why? <kkeller-usenet@wombat.san-francisco.ca.us>
    Re: Can't change filenames..why? <edMbj@aes-intl.com>
    Re: Can't change filenames..why? <edMbj@aes-intl.com>
    Re: Can't change filenames..why? <uri@stemsystems.com>
    Re: Can't change filenames..why? krakle@visto.com
    Re: Can't change filenames..why? <edMbj@aes-intl.com>
    Re: Can't change filenames..why? <paduille.4060.mumia.w+nospam@earthlink.net>
    Re: How to resolve funky sync issues with fork here. anno4000@radom.zrz.tu-berlin.de
        How to run Perl script as GUI Windows program? Like Wor <max@xxx.tovle.ct>
    Re: How to run Perl script as GUI Windows program? Like <scobloke2@infotop.co.uk>
        How to turn off "Caps Lock" from Perl script. <katera@tovle.ct>
        new CPAN modules on Wed Apr  4 2007 (Randal Schwartz)
    Re: perl OOP <please@nospam.net>
    Re: Problem in the Perl script <please@nospam.net>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Tue, 03 Apr 2007 21:35:26 -0700
From: Ed Jay <edMbj@aes-intl.com>
Subject: Re: Can't change filenames..why?
Message-Id: <22a61316cf61tdm87u2927eb7i4kk4l2jv@4ax.com>

Purl Gurl scribed:

>Purl Gurl wrote:
>
>> Ed Jay wrote:
>
>(snipped)
>
>>> rename($filename,$imgCode$i.jpg) or die "Could not rename file: $!";   
>
>>> The original files upload fine. Everything seems to work...until I try to
>>> change the filenames. The script dies trying to change the first 
>>> filename.
>
>> Have you considered reading your returned error message?
>
>
>c:\apache\users\test>perl -c test.pl
>Bad name after maryjones040307' at test.pl line 6.
>
>c:\apache\users\test>perl -c test.pl
>Scalar found where operator expected at test.pl line 36, near "$imgCode$i"
>         (Missing operator before $i?)
>syntax error at test.pl line 36, near "$imgCode$i"
>test.pl had compilation errors.
>
>Interesting you are able to run a script which will not compile.

Thanks for the diplomacy. An asshole would have accused me of lying.
>
When I ran the script through my local Perl installation, I did not receive
the same messages as you show, above. The only message relating to the
errant line I get is "Unquoted string "jpg" may clash with future reserved
word at E:\br-ca-4\brca_upload.pl line 64." 

This is cut/paste of the pertinent portion of a lengthy script. I
successfully upload between one and five files of my selection. Strange that
it won't compile for you. When I try to rename the uploaded file, the script
crashes.

use warnings;
use CGI qw(:standard);
$query = new CGI;

$filePath = "/home/wwwbrea/public_html/uploads";
$imgCode = param('imgCode');	#ptId.modDate e.g., maryjones040507
$imgCnt=param('imgCn');	#number of images to be uploaded

	my @VAL = $query->param; #get all form field names
	foreach(@VAL){
	$FORM{$_} = $query->param($_); # put all fields and values in hash 
}
	my @files;
	foreach(keys %FORM){
	if($_ =~ /^myFile/){		#Should be FILE
	push(@files, $_); # place the field NAME in array @files
	}
}
#	Access the array
	$i=0;my @fn;
	for($i=0;$i<$imgCnt;$i++) {
	$fn[$i] = param($files[$i]);	
	$filename=$fn[$i];	#e.g., original filenames
	$filename =~ s/.*[\/\\](.*)/$1/;
	
	$upload_filehandle = $query->upload($files[$i]); 
	open (UPLOADFILE, ">$filePath/$filename") or die "Can't Open
$filename. $!"; 
	binmode UPLOADFILE; 
	while (<$upload_filehandle>) {
	print UPLOADFILE;
 	}
	close UPLOADFILE or die "Can't Close. $!";
	chdir $filepath;
#	rename($filename[$i],$imgCode[$i].jpg) or die "Could not rename
file: $!";	
}
-- 
Ed Jay (remove 'M' to respond by email)


------------------------------

Date: Tue, 3 Apr 2007 21:47:25 -0700
From: Keith Keller <kkeller-usenet@wombat.san-francisco.ca.us>
Subject: Re: Can't change filenames..why?
Message-Id: <u7nbe4xgj.ln2@goaway.wombat.san-francisco.ca.us>

On 2007-04-04, Ed Jay <edMbj@aes-intl.com> wrote:
>
> Thanks for the diplomacy. An asshole would have accused me of lying.

An inconsiderate person would post a script that doesn't even compile.

> This is cut/paste of the pertinent portion of a lengthy script. I
> successfully upload between one and five files of my selection. Strange that
> it won't compile for you. When I try to rename the uploaded file, the script
> crashes.

Define ''crashes''.  Have you read the Posting Guidelines as that
''asshole'' Tad wisely recommended you do?

> use warnings;
> use CGI qw(:standard);
> $query = new CGI;

You are still not using use strict; .  Why should anybody help you when
you refuse to help yourself?

[code that doesn't compile under use strict; snipped]

--keith


-- 
kkeller-usenet@wombat.san-francisco.ca.us
(try just my userid to email me)
AOLSFAQ=http://www.therockgarden.ca/aolsfaq.txt
see X- headers for PGP signature information



------------------------------

Date: Tue, 03 Apr 2007 21:59:48 -0700
From: Ed Jay <edMbj@aes-intl.com>
Subject: Re: Can't change filenames..why?
Message-Id: <vqa613l5beo2k6mhfkp8kgn1pvrf1d484p@4ax.com>

Mumia W. scribed:

>On 04/03/2007 07:39 PM, Ed Jay wrote:
>> My user selects up to five files to upload. I need to change the filenames
>> to coded names. I can't effect a name change.
>> 
>> The script:
>> 
>> use CGI qw(:standard);
>
>Missing:
>
>   use strict;
>   use warnings;
>
>Please modify your program to work with them. "Strict" and "warnings" 
>will capture most errors early.
>
>> $query = new CGI;
>> $filepath = 'http://yadayada.com/uploads;
>
>That is not a filepath. That's a URL.
>
>
>> $imgCode = 'maryjones040307';
>> 
>> #First, filter the filenames out of all form elements and store in an array:
>> 
>> my @VAL = $query->param; 	#get all form field names
>>   foreach(@VAL){
>>      $FORM{$_} = $query->param($_); # put all fields and values in hash 
>>   }
>> my @files;
>>   foreach(keys %FORM){
>>     if($_ =~ /^myFile/){
>>       push(@files, $_); 		# place the form field NAME in array
>>     }
>>   }
>> #Access the array and upload the files
>> $i=0; my @fn;
>> for($i = 0; $i < $imgCnt; $i++) {
>>   $fn[$i] = param($files[$i]);	
>>   $filename=$fn[$i];	#e.g., original filenames
>>   $filename =~ s/.*[\/\\](.*)/$1/;
>> 
>>     $upload_filehandle = $query->upload($files[$i]); 
>>      open (UPLOADFILE, ">$filePath/$filename") or die "!Open $filename. $!";
>
>You have two problems here. The first is that "open" cannot accept a URL 
>as an argument, so "open (UPLOADFILE, 
>'>http://yadayada.com/uploads/mjones04221.pdf')" is an error.
>
>The second problem is that $filePath is undefined. You meant to write 
>$filepath (notice the difference in capitalization for 'P'). 
>Effectively, you tried to do this:
>
>   open (UPLOADFILE, '>/mjones04221.pdf') or die ...
>
>Your program doesn't have permission to write into the root directory, 
>so this fails.
>
>
>> binmode UPLOADFILE; 
>>       while (<$upload_filehandle>) {
>>         print UPLOADFILE;
>
>You probably want to do this:
>
>   print UPLOADFILE $_;
>
>> }
>> close UPLOADFILE or die "Can't Close $filename. $!";
>> 
>> chdir $filepath;
>> rename($filename,$imgCode$i.jpg) or die "Could not rename file: $!";	
>
>Just to be sure, I would write this;
>
>   rename ($filename, "$imgCode$i.jpg") or die ...
>
>You really need strictures (use strict) and warnings (use warnings) 
>turned on, because all of the problems with your program were related to 
>them being off.
>
>
>> }
>> 
>> What I'm hoping will result for (e.g.) three files of inconsequential
>> original filenames is:
>> 
>> maryjones0403070.jpg
>> maryjones0403071.jpg
>> maryjones0403072.jpg
>> 
>> The original files upload fine. Everything seems to work...until I try to
>> change the filenames. The script dies trying to change the first filename.
>
>Just in case you haven't already read them, here are the posting 
>guidelines for comp.lang.perl.misc:
>
>http://www.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html
>
>
Thanks for all your comments. 

In my haste to stop banging my head, I carelessly abandoned the guidelines
protocol and incorrectly posted an URL for $filePath. I apologize. It is:

$filePath = "/home/wwwbrea/public_html/uploads";

You did, however, provide a useful hint. I had chdir $filepath when
$filePath was defined. 

The problem was a syntax error. The rename syntax was bad. Correct is:

chdir $filePath;
$ext = $i.'.jpg';
rename($filename,$imgCode.$ext) or die "Could not rename file: $!";

Thanks all for the hints.
-- 
Ed Jay (remove 'M' to respond by email)


------------------------------

Date: Tue, 03 Apr 2007 22:01:27 -0700
From: Ed Jay <edMbj@aes-intl.com>
Subject: Re: Can't change filenames..why?
Message-Id: <d6c6139pqgd9kl3vot9aa48co7fk6qthk4@4ax.com>

Tad McClellan scribed:

>Ed Jay <edMbj@aes-intl.com> wrote:
>
>> $filepath = 'http://yadayada.com/uploads;
>
>
>You need quotes on *both* ends of strings.
>
>
>>      open (UPLOADFILE, ">$filePath/$filename") or die "!Open $filename. $!";
>
>
>$filePath does not contain a file path. It contains a URL.
>
>Errr, well, it would contain that if you had Real Perl Code.
>
>
>> rename($filename,$imgCode$i.jpg) or die "Could not rename file: $!";	
>                   ^^^^^^^^^^
>
>Syntax error.
>
>
>> The original files upload fine. Everything seems to work.
>
>
>We cannot help you if you lie to us.

You need to learn some table manners.
-- 
Ed Jay (remove 'M' to respond by email)


------------------------------

Date: Wed, 04 Apr 2007 01:36:52 -0400
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: Can't change filenames..why?
Message-Id: <x7ps6klmyz.fsf@mail.sysarch.com>

>>>>> "EJ" == Ed Jay <edMbj@aes-intl.com> writes:

  EJ> Tad McClellan scribed:
  >> 
  >>> The original files upload fine. Everything seems to work.
  >> 
  >> We cannot help you if you lie to us.

  EJ> You need to learn some table manners.

ever watch house on tv. as he says everyone lies. simple fact of life.

and if you think getting a tough but correct answer from tad is worse
than a polite but stupid answer from moronzilla (also know as
gurlknowsnoperl) then you have a lot to learn.

and get perl on your own box and test it there. relying on uploading to
test perl is like using stilts to ice skate.

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: 3 Apr 2007 23:04:09 -0700
From: krakle@visto.com
Subject: Re: Can't change filenames..why?
Message-Id: <1175666649.327770.137820@b75g2000hsg.googlegroups.com>

On Apr 3, 6:39 pm, Ed Jay <e...@aes-intl.com> wrote:

> Everything seems to work...

Except for everything you posted :)



------------------------------

Date: Tue, 03 Apr 2007 23:18:15 -0700
From: Ed Jay <edMbj@aes-intl.com>
Subject: Re: Can't change filenames..why?
Message-Id: <sjg613lqu5clsccu4r8si9561tvddoaiq5@4ax.com>

Uri Guttman scribed:

>>>>>> "EJ" == Ed Jay <edMbj@aes-intl.com> writes:
>
>  EJ> Tad McClellan scribed:
>  >> 
>  >>> The original files upload fine. Everything seems to work.
>  >> 
>  >> We cannot help you if you lie to us.
>
>  EJ> You need to learn some table manners.
>
>ever watch house on tv. as he says everyone lies. simple fact of life.
>
>and if you think getting a tough but correct answer from tad is worse
>than a polite but stupid answer from moronzilla (also know as
>gurlknowsnoperl) then you have a lot to learn.

A tough answer that includes name calling isn't a tough answer. It's an
inappropriate and offensive response. 
>
>and get perl on your own box and test it there. relying on uploading to
>test perl is like using stilts to ice skate.
>
I have Perl installed. As I mentioned to another, my warnings did not hint
at the real problem, as did hers.
-- 
Ed Jay (remove 'M' to respond by email)


------------------------------

Date: Wed, 04 Apr 2007 09:02:13 GMT
From: "Mumia W." <paduille.4060.mumia.w+nospam@earthlink.net>
Subject: Re: Can't change filenames..why?
Message-Id: <pQJQh.19360$tD2.5565@newsread1.news.pas.earthlink.net>

On 04/03/2007 11:59 PM, Ed Jay wrote:
> [...]
> $filePath = "/home/wwwbrea/public_html/uploads";
> 
> You did, however, provide a useful hint. I had chdir $filepath when
> $filePath was defined. 
> [...]

This is exactly the type of error that "use strict;" catches automatically:

--------prg--------
#!/usr/bin/perl
use strict;
use warnings;

my $filePath = '/tmp/upload';
chdir $filepath;
-------output-------
Global symbol "$filepath" requires explicit package name at try1 line 6.
BEGIN not safe after errors--compilation aborted at try1 line 25.
-------end------




------------------------------

Date: 4 Apr 2007 08:30:32 GMT
From: anno4000@radom.zrz.tu-berlin.de
Subject: Re: How to resolve funky sync issues with fork here.
Message-Id: <57h618F2cvr8gU1@mid.dfncis.de>

grocery_stocker <cdalten@gmail.com> wrote in comp.lang.perl.misc:
> On Apr 3, 8:08 pm, Tad McClellan <t...@augustmail.com> wrote:
> > ["Followup-To:" header set to comp.lang.perl.misc.]
> >
> > grocery_stocker <cdal...@gmail.com> wrote:
> > > Sometmes don't appear in sync. How would I get them in sync?
> >
> >    $| = 1;
> >
> > > Just need some ideas
> > > here.
> >
> >    Suffering from Buffering?
> >
> >      http://perl.plover.com/FAQs/Buffering.html
> >
> 
> I tried several variations on $|=1, however, it's still not in sync.

I don't see how you could expect them to be in sync.  The "BEFORE FOR
BRACKET" lines come from the parent, the others from the kids.
Different processes run independent from one another, so each time
around the loop it's up to the OS whether the kid or the parent gets
to execute first.

If you move the "sleep 5" in the kid code to before the "print" line,
you'll see *all* "BEFORE FOR BRACKET" lines before all of the kids'
output.  No surprise there.

Anno

[code left in for place reference, also note comment]

> #!/usr/bin/perl -w
> 
> my @array = qw(ugh geeze blah test smith bob homes point);
> 
> my $num = "10";
> for(1..$num) {
>     my $pid = fork();
>     if ($pid) {
>     # parent
>         push(@childs, $pid);
>         my $oldfh = select(STDOUT); $| = 1; select ($oldfh);
> 
>     } elsif ($pid == 0) {

You should test for defined-ness here, not for being zero.

      } elsif ( defined $pid ) {

>     # child
>         #my $oldfh = select(STDOUT); $| = 1;
> 
>         print "@array\n";
>         #$oldfh = select(STDOUT); $| = 1; select($oldfh);
> 
>         sleep 5;
>         exit(0);
>     } else {
>         die "couldn't fork: $!\n";
>     }
> 
>     #my $olderfh = select(STDOUT); $| = 1;
>     print "BEFORE FOR BRACKET\n";
>     #$olderfh = select(STDOUT); $| = 1; select($olderfh);
> 
> }
> 
> #$oldestfh = select(STDOUT); $| = 1; select($oldestfh);
> 
> print "AFTER FOR BRACKET\n";
> #$oldestfh = select(STDOUT); $| = 1; select($oldestfh);
> 
> 
> foreach (@childs) {
>     waitpid($_, 0);
> }
> 
> However, I still get the following:
> 
> [cdalten@localhost perl]$ ./par.pl
> ugh geeze blah test smith bob homes point
> BEFORE FOR BRACKET
> ugh geeze blah test smith bob homes point
> BEFORE FOR BRACKET
> ugh geeze blah test smith bob homes point
> BEFORE FOR BRACKET
> ugh geeze blah test smith bob homes point
> BEFORE FOR BRACKET
> ugh geeze blah test smith bob homes point
> BEFORE FOR BRACKET
> ugh geeze blah test smith bob homes point
> BEFORE FOR BRACKET
> ugh geeze blah test smith bob homes point
> BEFORE FOR BRACKET
> BEFORE FOR BRACKET
> ugh geeze blah test smith bob homes point
> BEFORE FOR BRACKET
> ugh geeze blah test smith bob homes point
> BEFORE FOR BRACKET
> AFTER FOR BRACKET
> ugh geeze blah test smith bob homes point
> [cdalten@localhost perl]$ ./par.pl
> 
> 




------------------------------

Date: Wed, 4 Apr 2007 09:43:30 +0200
From: "max" <max@xxx.tovle.ct>
Subject: How to run Perl script as GUI Windows program? Like Word, Notepad, Calculator etc.
Message-Id: <euvkua$9bd$1@ss408.t-com.hr>

How to run Perl script as GUI Windows program? Like Word, Notepad,
Calculator etc.






------------------------------

Date: Wed, 04 Apr 2007 10:24:58 +0100
From: Ian Wilson <scobloke2@infotop.co.uk>
Subject: Re: How to run Perl script as GUI Windows program? Like Word, Notepad, Calculator etc.
Message-Id: <46136eee$0$19248$da0feed9@news.zen.co.uk>

max wrote:
> How to run Perl script as GUI Windows program? Like Word, Notepad,
> Calculator etc.

Use perl/Tk or wxPerl


------------------------------

Date: Wed, 4 Apr 2007 09:55:20 +0200
From: "katera" <katera@tovle.ct>
Subject: How to turn off "Caps Lock" from Perl script.
Message-Id: <euvlkg$bh0$1@ss408.t-com.hr>

How to turn off "Caps Lock" from Perl script.
Tnx.
Katera




------------------------------

Date: Wed, 4 Apr 2007 04:42:10 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Wed Apr  4 2007
Message-Id: <JFyIEA.1FHu@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.

Agent-TCLI-0.02
http://search.cpan.org/~hacker/Agent-TCLI-0.02/
Transactional Contextual Line Interface
----
Agent-TCLI-Package-Net-0.01
http://search.cpan.org/~hacker/Agent-TCLI-Package-Net-0.01/
----
Audio-MPD-0.16.2
http://search.cpan.org/~jquelin/Audio-MPD-0.16.2/
Class for talking to MPD (Music Player Daemon) servers
----
Bot-BasicBot-Pluggable-Module-RT-0.01
http://search.cpan.org/~dams/Bot-BasicBot-Pluggable-Module-RT-0.01/
Retrieves information of RT tickets
----
Catalyst-Plugin-ConfigLoader-0.14
http://search.cpan.org/~bricas/Catalyst-Plugin-ConfigLoader-0.14/
Load config files of various types
----
Catalyst-Plugin-SubRequest-0.11
http://search.cpan.org/~mramberg/Catalyst-Plugin-SubRequest-0.11/
Make subrequests to actions in Catalyst
----
Class-DBI-MockDBD-0.03
http://search.cpan.org/~teejay/Class-DBI-MockDBD-0.03/
Mocked database interface for Class::DBI
----
Class-STL-Containers-0.35
http://search.cpan.org/~gaffie/Class-STL-Containers-0.35/
Perl extension for STL-like object management
----
Class-Simple-0.07
http://search.cpan.org/~sullivan/Class-Simple-0.07/
Simple Object-Oriented Base Class
----
Config-Basic-1.81
http://search.cpan.org/~fdulau/Config-Basic-1.81/
----
DBIx-Class-TimeStamp-0.03
http://search.cpan.org/~jshirley/DBIx-Class-TimeStamp-0.03/
----
DBIx-Simple-1.28
http://search.cpan.org/~juerd/DBIx-Simple-1.28/
Easy-to-use OO interface to DBI
----
DBIx-Simple-1.29
http://search.cpan.org/~juerd/DBIx-Simple-1.29/
Easy-to-use OO interface to DBI
----
Data-Validate-Japanese-0.01
http://search.cpan.org/~dmaki/Data-Validate-Japanese-0.01/
Validate Japanese Input
----
Dir-Project-3.001
http://search.cpan.org/~wsnyder/Dir-Project-3.001/
Project Environment determination
----
Finance-QuoteTW-0.05
http://search.cpan.org/~alec/Finance-QuoteTW-0.05/
Fetch quotes of mutual funds in Taiwan
----
Finance-QuoteTW-0.06
http://search.cpan.org/~alec/Finance-QuoteTW-0.06/
Fetch quotes of mutual funds in Taiwan
----
Font-TTF-0.41
http://search.cpan.org/~mhosken/Font-TTF-0.41/
Perl module for TrueType Font hacking
----
Font-TTF-Scripts-0.8
http://search.cpan.org/~mhosken/Font-TTF-Scripts-0.8/
Smart font script supporting modules and scripts for TTF/OTF
----
Font-TTF-Scripts-0.8a
http://search.cpan.org/~mhosken/Font-TTF-Scripts-0.8a/
Smart font script supporting modules and scripts for TTF/OTF
----
IPC-Locker-1.462
http://search.cpan.org/~wsnyder/IPC-Locker-1.462/
Distributed lock handler
----
Image-Pngslimmer-0.22
http://search.cpan.org/~acmcmen/Image-Pngslimmer-0.22/
slims (dynamically created) PNGs
----
JSON-XS-1.1
http://search.cpan.org/~mlehmann/JSON-XS-1.1/
JSON serialising/deserialising, done correctly and fast
----
Lingua-PT-Gender-1.03
http://search.cpan.org/~kcarnut/Lingua-PT-Gender-1.03/
Decides if a Portuguese proper name is male or female
----
Mail-Sort-20070403
http://search.cpan.org/~thedevil/Mail-Sort-20070403/
split incoming mail according to header matching conditions
----
Math-Polygon-0.99
http://search.cpan.org/~markov/Math-Polygon-0.99/
Class for maintaining polygon data
----
Module-Starter-Smart-v0.0.2
http://search.cpan.org/~rueycheng/Module-Starter-Smart-v0.0.2/
Add new modules into an existing distribution with this plugin
----
Peco-1.0
http://search.cpan.org/~rhundt/Peco-1.0/
----
Pod-HtmlEasy-0.091
http://search.cpan.org/~gleach/Pod-HtmlEasy-0.091/
Generate personalized HTML from PODs.
----
SWISH-Prog-0.07
http://search.cpan.org/~karman/SWISH-Prog-0.07/
build Swish-e programs
----
Schedule-Load-3.050
http://search.cpan.org/~wsnyder/Schedule-Load-3.050/
Load distribution and status across multiple host machines
----
Test-MinimumVersion-0.003
http://search.cpan.org/~rjbs/Test-MinimumVersion-0.003/
does your code require newer perl than you think?
----
Text-Aspell-0.07
http://search.cpan.org/~hank/Text-Aspell-0.07/
Perl interface to the GNU Aspell library
----
UNIVERSAL-cant-v0.0.1
http://search.cpan.org/~dmuey/UNIVERSAL-cant-v0.0.1/
See if an object or package cant do something
----
WWW-Google-API-0.002
http://search.cpan.org/~jcap/WWW-Google-API-0.002/
Perl client to the Google API <http://code.google.com/apis/>
----
WWW-Google-API-0.002_2
http://search.cpan.org/~jcap/WWW-Google-API-0.002_2/
Perl client to the Google API <http://code.google.com/apis/>
----
WWW-Google-API-0.003
http://search.cpan.org/~jcap/WWW-Google-API-0.003/
Perl client to the Google API <http://code.google.com/apis/>
----
WebService-TWFY-API-0.02
http://search.cpan.org/~sden/WebService-TWFY-API-0.02/
API interface for TheyWorkForYou.com
----
YVDHOVE-String-0.01
http://search.cpan.org/~yvdhove/YVDHOVE-String-0.01/
Library with useful String functions
----
pip-0.08a
http://search.cpan.org/~adamk/pip-0.08a/
Console application for running Perl 5 Installer (P5I) files


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: Wed, 04 Apr 2007 01:23:34 -0700
From: Xiong Changnian <please@nospam.net>
Subject: Re: perl OOP
Message-Id: <please-B35F9A.01233404042007@free.teranews.com>

In article <slrnf156i7.s2c.abigail@alexandra.abigail.be>,
 Abigail <abigail@abigail.be> wrote:

> Xiong Changnian (please@nospam.net) wrote on MMMMCMLXIII September
> MCMXCIII in <URL:news:please-9A3ECC.10162403042007@free.teranews.com>:
> ||  
> ||  BUT, new -- an object constructor -- is, by definition, used to make a 
> ||  new object.
> 
> No. 'new' doesn't so by definition....

What you mean to say is that "new" is not a reserved keyword; you're 
right: it's arbitrarily chosen. 

An object constructor is used to make a new object and in my sample code 
I have /defined/ new to be an object constructor. My method new is, by 
definition, used to make a new object. 

* * *

Why would anyone have a problem with this? I really don't understand why 
anyone would quibble in this fashion. What's the point? 

I don't subscribe to the paranoid theory of IT: circle the wagons 
against vendors who wear the wrong color suits. Still, it's true that 
other languages *compete* with Perl -- for time, attention, shelf space, 
floor space, podium time, blog buzz, projects, and above all, money. 
Competition means we need to be more *attractive* than the next language 
community. 

We gain nothing at all by behaving like a tank full of sharks. Some 
middle manager or student comes along and tosses a bit of chum at us and 
we snap viciously at it; now the blood is in the water and we snap at 
one another. 

Whom do we serve by this uncollegial attitude? We all like to be right 
but sometimes that means we need to let other people be right, too. 

I promise that nobody will get hired for a job because a manager is 
browsing this group and stumbles on a post in which A roots out a subtle 
inexactness in B's post. It's not likely that anyone with the power of 
the checkbook will be reading this group at all but if he is, his first 
thought on seeing such a post will be: 

"Oh, I'm glad such a disruptive person isn't in my department, telling 
his co-workers what idiots they are." 

His second thought may not lie so close to the surface; he'll be slower 
to make the judgement but the poison will accumulate, like mercury: 

"Perl wizards are jerks; I don't want to do anything in Perl because 
then I'd have to hire jerks." 

Ladies, gentlemen -- think. 

The one greatest service we can do one another -- the greatest honor we 
can pay Larry Wall and the small army who have built Perl into such a 
fine tool -- is to be civil to one another and helpful to newcomers and 
outsiders. 

We will not always be correct or exact and if the error is significant, 
we'll do well to point it out -- politely. If it is some quibble beneath 
the level of importance to someone trying to use the tool to do work, it 
is probably better left unsaid. And if some lack of mutual understanding 
of the English language opens a gap in our comprehension of another 
poster's intent, it's almost surely better not to risk exposure for the 
sake of a little ego-feeding. 

Please -- I beg of you all -- let's be nice. Let's not be petty. Let's 
try to be the sort of people that someone, somewhere, might actually 
entrust with a task of some responsibility. Let's try to be the kind of 
people who are invited to return, not those who are asked to leave. 

Thank you.
-- 
Xiong Changnian
xiong102ATxuefangDOTcom

-- 
Posted via a free Usenet account from http://www.teranews.com



------------------------------

Date: Wed, 04 Apr 2007 00:46:20 -0700
From: Xiong Changnian <please@nospam.net>
Subject: Re: Problem in the Perl script
Message-Id: <please-642DA0.00462004042007@free.teranews.com>

In article <um1513dd1lejhtruvh1bs5t43k4qpta166@4ax.com>,
 Michele Dondi <bik.mido@tiscalinet.it> wrote:

> >We've all heard the story of the IBM interview question: "Why are 
> >manhole covers round?" 
> 
> I hadn't. I didn't even know what "manhole" meant. Of course I do know
> what a manhole is. I just didn't know the English word....

Philip Roth writes of his struggle with his parents' native language 
(Yiddish) in /Portnoy's Complaint/:

I was already the darling of the first grade, and in every schoolroom 
competition, expected to win hands down, when I was asked by the teacher 
one day to identify a picture of what I knew perfectly well my mother 
referred to as a "spatula." But for the life of me I could not think of 
the word in English. Stammering and flushing, I sank defeated into my 
seat, not nearly so stunned as my teacher but badly shaken up just the 
same...in a state resembling torment -- in this particular instance over 
something as monumental as a kitchen utensil.
-- 
Xiong Changnian
xiong102ATxuefangDOTcom

-- 
Posted via a free Usenet account from http://www.teranews.com



------------------------------

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 300
**************************************


home help back first fref pref prev next nref lref last post