[7781] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1406 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Dec 4 14:07:43 1997

Date: Thu, 4 Dec 97 11:00:20 -0800
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, 4 Dec 1997     Volume: 8 Number: 1406

Today's topics:
     Re: eval, catch/try, and parameters <rootbeer@teleport.com>
     Re: Ignore a "bad free"? <rootbeer@teleport.com>
     need the skinny on my() vs local() <davidk@nospam.cnct.com>
     Re: Perl Contractors Wanted (Andrew M. Langmead)
     Re: Seems to be just another  5.004_* bug:-( <rootbeer@teleport.com>
     Re: some good perl-sites <rootbeer@teleport.com>
     Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Tue, 2 Dec 1997 16:43:30 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Aaron Minner <minner@chirondiag.com>
Subject: Re: eval, catch/try, and parameters
Message-Id: <Pine.GSO.3.96.971202163950.19514R-100000@usertest.teleport.com>

On Tue, 2 Dec 1997, Aaron Minner wrote:

> Argument "mercury" isn't numeric in entersub at
> /usr/local/lib/perl5/sun4-solaris/5.00393/Socket.pm line 270.

Sounds like the sort of thing that the Perl debugger would be good at
finding.

>   $connected = eval 'connectToServiceByName( &SERVICEHOST, &SERVICE)';

I'd write this with a block:

    $connected = eval {
	connectToServiceByName( &SERVICEHOST, &SERVICE);
    };

It captures errors in the same way, but without any runtime compilations.

> BEGIN
> {
>   eval 'sub SERVICE      { "myService"; }';
>   eval 'sub SERVICEHOST  { "somehost";    }';
> 
>   eval 'sub MAXCONNTRIES { 1;            }';

I don't see why you're using eval here. Why don't you simply define those
subs directly? Or, better, use 5.004's 'use constant' pragma? Hope this
helps!

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/
              Ask me about Perl trainings!



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

Date: Tue, 2 Dec 1997 16:46:59 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Alan Fahrner <sherlock.holmes@worldnet.att.net>
Subject: Re: Ignore a "bad free"?
Message-Id: <Pine.GSO.3.96.971202164525.19514S-100000@usertest.teleport.com>

On Tue, 2 Dec 1997, Alan Fahrner wrote:

> I've written a perl program that is sometimes causing an error message I
> never got before about a bad free being ignored.
> 
> Research leads me to believe that this is an internal perl error.

That's correct.

> Is this bad free safe to ignore?  

No; it means that there's a serious bug in your perl binary (or in some
code linked with it). If you've got any XSUBs, those are likely to be the
culprits. Good luck!

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/
              Ask me about Perl trainings!



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

Date: Thu, 4 Dec 1997 13:45:06 -0500
From: "Dave Kaufman" <davidk@nospam.cnct.com>
Subject: need the skinny on my() vs local()
Message-Id: <666ula$jir@world6.bellatlantic.net>

I was about to paste some functions from a "require" -ed script into my the
calling script, and forego the require and the need for two files.  But I
see that the functions I'm (ripping off) --copying, use local() to declare
all the variables, whereas I always use my() to avoid namespace collisions
from inside functions.

I'm afeared.  What is the difference between my() and local() ?

I read the camel book explanation but it sailed right over my pea brain.  It
explained the difference in terms of lexical namespaces, assuming I knew
what a lexical namespace was :-)

Can someone lend me a clue?  Will the world come tumbling down if I change
those local's to my's?  Will Hell freeze over?  Will Larry come down and
thump me on the head?  Or will all mankind learn to love one another and
world peace be finally achieved?

TIA,

- Dave Kaufman <davidk@cnct.com>
------------------------------------------------
" "
-anonymous (clearly)
------------------------------------------------




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

Date: Thu, 4 Dec 1997 15:51:13 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: Perl Contractors Wanted
Message-Id: <EKo9DE.FE1@world.std.com>

Gary Howland <ghowland@hotlava.com> writes:

>Martien Verbruggen wrote:
[points out grammatical errors in an employment ad]

>Give him a break. (You have to bear in mind he's probably just an MBA,
>not a perl techie).

I'd hope that someone who has earned an MBA has taken courses in
writing.

Someone correct me if I'm wrong.
-- 
Andrew Langmead


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

Date: Tue, 2 Dec 1997 16:22:59 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Vladimir Sovetov <sova@kpbank.ru>
Subject: Re: Seems to be just another  5.004_* bug:-(
Message-Id: <Pine.GSO.3.96.971202162127.19514O-100000@usertest.teleport.com>

On 1 Dec 1997, Vladimir Sovetov wrote:

>                    s/<(?:[^>'"]+|(['"]).+?\1)*>//gs;

>   Yes!! It's dumb all over:-)) and incorrect, but it shouldn't hang-up
>  from my point of view in any case!

It doesn't hang; it merely takes a few million seconds to do what you've
asked. :-)   See the hip owls book ("Mastering Regular Expressions") to
see what's gone wrong and how to fix it. Good luck!

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/
              Ask me about Perl trainings!



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

Date: Tue, 2 Dec 1997 16:31:27 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Johan Dalstrom <sap1d@canit.se>
Subject: Re: some good perl-sites
Message-Id: <Pine.GSO.3.96.971202163048.19514P-100000@usertest.teleport.com>

On 2 Dec 1997, Johan Dalstrom wrote:

> I'm learning perl and I'd like to know if there are any good
> tutorials and FAQ's etc..
> 
> If you know any good sites.. Please mail me or post it in the
> group.

What search engine did you use that couldn't tell you any good sites? :-) 

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/
              Ask me about Perl trainings!



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

Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 8 Mar 97)
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.  

To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.

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.

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

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 V8 Issue 1406
**************************************

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