Mark Dominus on 10 Oct 2003 19:57:02 -0000


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: Perl source filter question


> Yes...this is obviously true, but luckily the problem I'm trying to 
> solve is much smaller.

If it is, I missed where you said in what way it is smaller.


> I might as well come clean. It's very simple: someone I work with wrote 
> some Apache::Registry scripts that use the one-arg form of "select" to 
> write out files on the webserver, but neglected to restore the 
> originally selected filehandle. So the immediate question was, "What 
> other scripts are calling select?"

OK, so now I need to know:  what are you trying to accomplish that
isn't accomplished by this:

        grep 'select' *.pl *.pm


?  Or maybe by:

        perl -nle 'print "$ARGV: $_" 
                    if /select \( [^,)]* \)/x'  *.pl *.pm

That looks for calls to 'select' that have fewer than two arguments. 

> But I figured, why not try to find something a little more generic? 
> Basically, something that can tell me which scripts contained references 
> to, say, Digest::MD5::md5hash? 

What would be wrong with 

        grep 'md5hash' *.pl *.pm

?  What value are we trying to add to this?



-
**Majordomo list services provided by PANIX <URL:http://www.panix.com>**
**To Unsubscribe, send "unsubscribe phl" to majordomo@lists.pm.org**