[26688] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 8794 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Dec 24 14:05:22 2005

Date: Sat, 24 Dec 2005 11:05:04 -0800 (PST)
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, 24 Dec 2005     Volume: 10 Number: 8794

Today's topics:
    Re: Apache and Perl in Windows <1usa@llenroc.ude.invalid>
    Re: Apache and Perl in Windows <news@lawshouse.org>
        BEGIN { package Foo; use Foo } <socyl@987jk.com.invalid>
    Re: protect perl script from spammers <NoSPam@NoSpam.com>
    Re: Serious Perl Regular Expression deficiency? <sdn.girths00869@zoemail.net>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Sat, 24 Dec 2005 15:24:22 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Apache and Perl in Windows
Message-Id: <Xns973669E046791asu1cornelledu@127.0.0.1>

Henry Law <news@lawshouse.org> wrote in news:1135431218.13994.0@ersa.uk.clara.net:

> A. Sinan Unur wrote:
>> Arn Anderson <AA@AA.com> wrote in news:dohqe70r4u@news2.newsguy.com:
>> 
>> 
>>>#!/usr/bin/perl -w         (I replaced with #!c:\Perl\bin\perl.exe) 
>> 
>> 
>> Why?
> 
> Apache under Windows checks the shebang line and if it's not valid emits 
> a not-terribly-informative "The system cannot find the path specified. 
>: couldn't spawn child process: ..." message.  I spent a very 
> frustrating afternoon a week or two back debugging this one.

Hmmm ... See:

<URL:http://httpd.apache.org/docs/2.0/mod/core.html#scriptinterpretersource>

<URL:http://groups.google.com/group/comp.lang.perl.misc/msg/2c41b461d98a586b>

<URL:http://groups.google.com/group/comp.lang.perl.misc/msg/2ba2cd005a3cf1f7>

Sinan


-- 
A. Sinan Unur <1usa@llenroc.ude.invalid>
(reverse each component and remove .invalid for email address)

comp.lang.perl.misc guidelines on the WWW:
http://mail.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html



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

Date: Sat, 24 Dec 2005 17:22:22 +0000
From: Henry Law <news@lawshouse.org>
Subject: Re: Apache and Perl in Windows
Message-Id: <1135444942.28148.0@damia.uk.clara.net>

A. Sinan Unur wrote:
> Henry Law <news@lawshouse.org> wrote in news:1135431218.13994.0@ersa.uk.clara.net:

>>Apache under Windows checks the shebang line and if it's not valid emits 
> Hmmm ... See:
> 
> <URL:http://httpd.apache.org/docs/2.0/mod/core.html#scriptinterpretersource>
 ... etc
> Sinan

Whereas A. Sinan Unur could with trivially extra effort have written

 > Yes, by default, but see ... etc

Your "Hmmm" drips disapproval.


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

Date: Sat, 24 Dec 2005 18:49:13 +0000 (UTC)
From: kj <socyl@987jk.com.invalid>
Subject: BEGIN { package Foo; use Foo }
Message-Id: <dok579$itq$1@reader1.panix.com>






One of the things I find most infuriating about Config::Std (aside
from the fact that there's nothing standard about it) is that it
imports the subroutine read_config into the invoking namespace,
whether it is requested or not.  I.e. even after

package MyPackage;
use Config::Std ();

one still ends up with a MyPackage::read_config subroutine that
one explicitly did not want.

And one can't simply revert to

BEGIN { require Config::Std; }

because, as it turns out, there is no Config::Std::read_config().
Therefore, if one forgoes the services of Config::Std::import, one
must then go behind the API, because the subroutine that normally
would get exported as "read_config" is actually called
Config::Std::Hash::read_config, at least this time around.

(BTW, these shenanigans seem to me *egregious* coming from the
author of "Perl Best Practices."  If these are best practices in
the Perl world, I don't want to see what passes for so-so practices.)

I am sorely tempted to do something like

BEGIN { package Config::Std; use Config::Std }

but in the end I don't know who's more likely to be hoist by his
own petard.

Is there a better work-around to prevent Config::Std from defecating
all over my namespace (other than avoiding Config::Std altogether)?

Bah-humbugly yours,

kj
-- 
NOTE: In my address everything before the first period is backwards;
and the last period, and everything after it, should be discarded.


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

Date: Sat, 24 Dec 2005 12:46:59 -0500
From: "Daniel Kaplan" <NoSPam@NoSpam.com>
Subject: Re: protect perl script from spammers
Message-Id: <1135446420.618892@nntp.acecape.com>

"Matt Garrish" <matthew.garrish@sympatico.ca> wrote in message 
news:ZEUqf.2674$1Y4.304857@news20.bellglobal.com...

> Herd mentality does not make things right. I read what was being discussed 
> not as good/bad, but as inconvenience to the user, which is what any 
> captcha is.
>
> They also only make it more difficult to abuse a site, not impossible. 
> With a bit of brain power and a little time (or a really good OCR program) 
> you could write a program to take the graphic and determine the code. It 
> probably won't always work (hence the design premise of captchas), but 
> even 1/100 are good odds for spammers.


Totally agree, and while the original poster has not replied again (nor 
posted in the proper forum,), just wanted to leave last bit of advice as in 
the path I chose, if it helps:

I used the module  GD::SecurityImage::AC which was very flexible in terms of 
using different fonts, colors, lines, shapes, etc.
Used a bunch of random variables so each image would be as different as 
possible in terms of which; fonts, size, colors, line shapes, # of lines, 
line colors, and font angles, were generated in each instance.

And of course I set it so that if the verification failed just once, a new 
Captcha would be generated (to avoid the brut-force method).

Granted a real knowledgeable abuser will eventually get by all that in the 
end, but I guess getting rid of the 95% of remaining punks out there is a 
time-saver in itself.

As for it being an inconvenience to the end-user, hey, what can you do?!?  I 
mean Norton Anti-Virus has become a bitch in itself to keep happy and 
running smooth...but what choice do I have?  It's just the way the world is 
right now. 




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

Date: Sat, 24 Dec 2005 10:28:40 -0600
From: "Eric J. Roode" <sdn.girths00869@zoemail.net>
Subject: Re: Serious Perl Regular Expression deficiency?
Message-Id: <Xns97367539864D4sdn.comcast@216.196.97.136>

robic0 wrote in news:va0pq1l4ft5mcoe32k45i3lgni97tdst5u@4ax.com:

> I don't see a solution to this problem that
> regular expressions can't exclude a string when 
> processing. It can exclude individual characters
> fine. I started doing Perl 2 years ago and have
> run into this nagging problem several times.

It's hard to figure out what you're expecting to find.  You never once said 
what you *want* the output to be.

I'm *guessing* that you want only the XML comments to be printed, and 
nothing else.

I came up with a regex in about two minutes that produces this output:

id: 15
 howdy folks 
 and still more 

id: 25
 howdy folks %SYSTEM is down <who cares?> 
 and still more 

Is that the output you wanted?

-- 
Eric
`$=`;$_=\%!;($_)=/(.)/;$==++$|;($.,$/,$,,$\,$",$;,$^,$#,$~,$*,$:,@%)=(
$!=~/(.)(.).(.)(.)(.)(.)..(.)(.)(.)..(.)......(.)/,$"),$=++;$.++;$.++;
$_++;$_++;($_,$\,$,)=($~.$"."$;$/$%[$?]$_$\$,$:$%[$?]",$"&$~,$#,);$,++
;$,++;$^|=$";`$_$\$,$/$:$;$~$*$%[$?]$.$~$*${#}$%[$?]$;$\$"$^$~$*.>&$=`


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

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 V10 Issue 8794
***************************************


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