[29468] in Perl-Users-Digest
Perl-Users Digest, Issue: 712 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Aug 3 00:09:47 2007
Date: Thu, 2 Aug 2007 21:09:09 -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, 2 Aug 2007 Volume: 11 Number: 712
Today's topics:
Re: @arts <kkeller-usenet@wombat.san-francisco.ca.us>
Re: FAQ 8.47 How do I keep my own module/library direct xhoster@gmail.com
Re: filehandle, read lines sln@netherlands.co
Re: filehandle, read lines xhoster@gmail.com
Re: filehandle, read lines xhoster@gmail.com
Re: I finally got a round tuit. (My first JAPH) usenet@DavidFilmer.com
Re: I finally got a round tuit. (My first JAPH) <admiralcap@gmail.com>
Re: I finally got a round tuit. (My first JAPH) <tadmc@seesig.invalid>
Re: I finally got a round tuit. (My first JAPH) usenet@DavidFilmer.com
Re: I finally got a round tuit. (My first JAPH) <dummy@example.com>
Re: Object creation failure in perl <bik.mido@tiscalinet.it>
Re: Prototypes/Parameters to a Function/Sub-Routine <olson_ord@yahoo.it>
Re: Prototypes/Parameters to a Function/Sub-Routine <olson_ord@yahoo.it>
Re: Prototypes/Parameters to a Function/Sub-Routine <olson_ord@yahoo.it>
Re: Prototypes/Parameters to a Function/Sub-Routine <olson_ord@yahoo.it>
SOAP::Lite "service" examples xhoster@gmail.com
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 2 Aug 2007 17:03:03 -0700
From: Keith Keller <kkeller-usenet@wombat.san-francisco.ca.us>
Subject: Re: @arts
Message-Id: <ou7ao4xsgi.ln2@goaway.wombat.san-francisco.ca.us>
On 2007-08-02, Steve K. <savagebeaste@yahoo.com> wrote:
>
> sigful, probably yes, but you'd be more so if your sig actually compiled
>:)
>
>
> $ perl
> {$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
> (($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
> .'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
> 256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,
> ^d
> syntax error at - line 3, next 2 tokens "=sub"
> syntax error at - line 3, next 2 tokens "->"
> Unterminated <> operator at - line 4.
IWFM:
$ perl
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
.'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,
^d
Just another Perl hacker,
Just another Perl hacker,
Just another Perl hacker,
Just another Perl hacker,
Just another Perl hacker,
Just another Perl hacker,
Just another Perl hacker,
Just another Perl hacker,
Just another Perl hacker,
Just another Perl hacker,
Just another Perl hacker,
Just another Perl hacker,
Just another Perl hacker,
Just another Perl hacker,
Just another Perl hacker,
Just another Perl hacker,
Just another Perl hacker,
Just another Perl hacker,
Just another Perl hacker,
and so on. But it doesn't terminate! Now Michele's sig is eating up
all my CPU. What am I supposed to do?!?
(Actually, I think Michele was referring to the part above the sig
block:
Michele
--
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
.'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,
This also works fine:
$ perl -e 'Michele'
$
Since it's a sig, not using strict is perfectly acceptable.)
--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: 03 Aug 2007 02:11:11 GMT
From: xhoster@gmail.com
Subject: Re: FAQ 8.47 How do I keep my own module/library directory?
Message-Id: <20070802221115.452$e6@newsreader.com>
PerlFAQ Server <brian@stonehenge.com> wrote:
> This is an excerpt from the latest version perlfaq8.pod, which
> comes with the standard Perl distribution. These postings aim to
> reduce the number of repeated questions as well as allow the community
> to review and update the answers. The latest version of the complete
> perlfaq is at http://faq.perl.org .
>
> --------------------------------------------------------------------
>
> 8.47: How do I keep my own module/library directory?
>
> When you build modules, use the PREFIX and LIB options when
> generating Makefiles:
>
> perl Makefile.PL PREFIX=/mydir/perl LIB=/mydir/perl/lib
What is the PREFIX doing? Why does that need to be set in addition
to LIB?
Sometimes when I follow this directions, it seems like the module
tries to install into
/mydir/perl/mydir/perl/lib
instead of /mydir/perl/lib
Xho
--
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service $9.95/Month 30GB
------------------------------
Date: Thu, 02 Aug 2007 19:34:40 -0700
From: sln@netherlands.co
Subject: Re: filehandle, read lines
Message-Id: <tp45b3le9g4v8e2rdgu5j34gm0uuv1aj69@4ax.com>
On Thu, 26 Jul 2007 12:50:58 -0000, roy <roy.schultheiss@googlemail.com> wrote:
>I receive a XML-File up to 1 GB full of orders every day. I have to
>split the orders and load them into a database for further processing.
>I share this job onto multiple processes. This runs properly now.
>
>Here a little impress from the code:
>
>------------------------------ 8< ------------------------------
>
>use Proc::Simple;
>use constant MAX_PROCESSES => 10;
>
>$filesize = -s "... file";
>$step = int($filesize/MAX_PROCESSES+1);
>
>for (my $i=0;$i<MAX_PROCESSES;$i++) {
> $procs[$i] = Proc::Simple->new();
> $procs[$i]->start(\&insert_orders, $filename, $i*$step, ($i+1)*
>$step);
>}
>
>...
Hey, this is hardcoded stuff, multiples of 10.
Lucky for you the format is the same everytime.
What do you do when the file is corrupt due to fragmentation
errors?
You can't be serious. This is XML man. What your doing is worse
than reading a serial port stream.
Sln
------------------------------
Date: 03 Aug 2007 03:35:41 GMT
From: xhoster@gmail.com
Subject: Re: filehandle, read lines
Message-Id: <20070802233544.851$Kg@newsreader.com>
sln@netherlands.co wrote:
> On Thu, 26 Jul 2007 12:50:58 -0000, roy <roy.schultheiss@googlemail.com>
> wrote:
>
> >I receive a XML-File up to 1 GB full of orders every day. I have to
> >split the orders and load them into a database for further processing.
> >I share this job onto multiple processes. This runs properly now.
> >
> >Here a little impress from the code:
> >
> >------------------------------ 8< ------------------------------
> >
> >use Proc::Simple;
> >use constant MAX_PROCESSES => 10;
> >
> >$filesize = -s "... file";
> >$step = int($filesize/MAX_PROCESSES+1);
> >
> >for (my $i=0;$i<MAX_PROCESSES;$i++) {
> > $procs[$i] = Proc::Simple->new();
> > $procs[$i]->start(\&insert_orders, $filename, $i*$step, ($i+1)*
> >$step);
> >}
> >
> >...
>
> Hey, this is hardcoded stuff, multiples of 10.
> Lucky for you the format is the same everytime.
>
> What do you do when the file is corrupt due to fragmentation
> errors?
>
> You can't be serious. This is XML man. What your doing is worse
> than reading a serial port stream.
To quite someone from a different thread, who is probably a troll
trying to resurrect himself under a new name:
: Yeah, can you describe whats wrong with it, or you just blowing smoke?
: Sln
Well, are you?
>
> Sln
Xho
--
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service $9.95/Month 30GB
------------------------------
Date: 03 Aug 2007 03:37:02 GMT
From: xhoster@gmail.com
Subject: Re: filehandle, read lines
Message-Id: <20070802233706.533$7G@newsreader.com>
sln@netherlands.co wrote:
> On Thu, 26 Jul 2007 12:50:58 -0000, roy <roy.schultheiss@googlemail.com>
> wrote:
>
> >I receive a XML-File up to 1 GB full of orders every day. I have to
> >split the orders and load them into a database for further processing.
> >I share this job onto multiple processes. This runs properly now.
> >
> >Here a little impress from the code:
> >
> >------------------------------ 8< ------------------------------
> >
> >use Proc::Simple;
> >use constant MAX_PROCESSES => 10;
> >
> >$filesize = -s "... file";
> >$step = int($filesize/MAX_PROCESSES+1);
> >
> >for (my $i=0;$i<MAX_PROCESSES;$i++) {
> > $procs[$i] = Proc::Simple->new();
> > $procs[$i]->start(\&insert_orders, $filename, $i*$step, ($i+1)*
> >$step);
> >}
> >
> >...
>
> Hey, this is hardcoded stuff, multiples of 10.
> Lucky for you the format is the same everytime.
>
> What do you do when the file is corrupt due to fragmentation
> errors?
>
> You can't be serious. This is XML man. What your doing is worse
> than reading a serial port stream.
To quote someone from a different thread, who is probably a troll
trying to resurrect himself under a new name:
: Yeah, can you describe whats wrong with it, or you just blowing smoke?
: Sln
Well, are you?
>
> Sln
Xho
--
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service $9.95/Month 30GB
------------------------------
Date: Thu, 02 Aug 2007 22:56:44 -0000
From: usenet@DavidFilmer.com
Subject: Re: I finally got a round tuit. (My first JAPH)
Message-Id: <1186095404.775833.275800@j4g2000prf.googlegroups.com>
On Aug 2, 3:06 pm, Matt Madrid <admiral...@gmail.com> wrote:
> This is my first attempt at a JAPH. Comments/critique welcome.
s/33/35/ (IMHO)
--
David Filmer (http://DavidFilmer.com)
------------------------------
Date: Thu, 02 Aug 2007 16:30:12 -0700
From: Matt Madrid <admiralcap@gmail.com>
Subject: Re: I finally got a round tuit. (My first JAPH)
Message-Id: <jsSdnWyzPZOZ9C_bnZ2dnUVZ_ojinZ2d@comcast.com>
usenet@DavidFilmer.com wrote:
> On Aug 2, 3:06 pm, Matt Madrid <admiral...@gmail.com> wrote:
>> This is my first attempt at a JAPH. Comments/critique welcome.
>
> s/33/35/ (IMHO)
>
Yeah, I though about omitting it altogether. I've seen some with
and without, but not many with a .
------------------------------
Date: Thu, 02 Aug 2007 23:41:23 GMT
From: Tad McClellan <tadmc@seesig.invalid>
Subject: Re: I finally got a round tuit. (My first JAPH)
Message-Id: <slrnfb4qjh.5ap.tadmc@tadmc30.sbcglobal.net>
Matt Madrid <admiralcap@gmail.com> wrote:
> usenet@DavidFilmer.com wrote:
>> On Aug 2, 3:06 pm, Matt Madrid <admiral...@gmail.com> wrote:
>>> This is my first attempt at a JAPH. Comments/critique welcome.
>>
>> s/33/35/ (IMHO)
>>
>
> Yeah,
Pay no attention to that followup, it is not a matter of opinion.
> I though about omitting it altogether. I've seen some with
> and without, but not many with a .
A JAPH is _supposed_ to end with a comma:
http://groups.google.com/group/comp.lang.perl.misc/msg/9622b0cf9d4bc27f
and
http://groups.google.com/group/comp.lang.perl.misc/msg/00b9c707a0d1994d
--
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"
------------------------------
Date: Thu, 02 Aug 2007 23:43:52 -0000
From: usenet@DavidFilmer.com
Subject: Re: I finally got a round tuit. (My first JAPH)
Message-Id: <1186098232.950443.11130@d30g2000prg.googlegroups.com>
On Aug 2, 4:30 pm, Matt Madrid <admiral...@gmail.com> wrote:
> Yeah, I though about omitting it altogether. I've seen some with
> and without, but not many with a .
To me ',' suggests list context. Surely this is a scalar
expression :)
--
David Filmer (http://DavidFilmer.com)
------------------------------
Date: Fri, 03 Aug 2007 02:47:36 GMT
From: "John W. Krahn" <dummy@example.com>
Subject: Re: I finally got a round tuit. (My first JAPH)
Message-Id: <cHwsi.71109$tB5.18978@edtnps90>
usenet@DavidFilmer.com wrote:
> On Aug 2, 4:30 pm, Matt Madrid <admiral...@gmail.com> wrote:
>> Yeah, I though about omitting it altogether. I've seen some with
>> and without, but not many with a .
>
> To me ',' suggests list context. Surely this is a scalar
> expression :)
',' doesn't effect context at all.
John
--
Perl isn't a toolbox, but a small machine shop where you
can special-order certain sorts of tools at low cost and
in short order. -- Larry Wall
------------------------------
Date: Thu, 02 Aug 2007 19:21:06 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: Object creation failure in perl
Message-Id: <g644b3l3qj5q8bm0u82q32g1f2h4v91062@4ax.com>
On Thu, 02 Aug 2007 06:21:23 -0700, ramesh.thangamani@gmail.com wrote:
>The thing here is the code is not failing always. I am using a cron
It can happen. Clearly, it will fail upon a condition. Without seeing
the code, or (preferably) a minimal version of it, it's hard to say.
>wrapper script which creates an object of a module, then runs a
>reports and emails it. The problem is it is failing only rarely like
This is hardly relevant except possibly for permission issues: which
have nothing to do with the fact that the code is an object creation
one.
>for eg once in a month. The script runs daily.
>
>I just wanted to know when we experience object creation failure.
In just so many situations that one can't really give you a proper
answer. The code that takes care of object creation can do quite about
anything, so the only proper answer to your actual question thus far
can only be: quite about anything.
>1. One thing is the system runs out of RAM, but it is very very
>remote scenario.
Yes, it can be. Hard to say without seeing the actual code. How 'bout
logging memory usage anyway, if you have this suspect?
>2. May be when the cron is running there is something which causing
>the failure in middle ?
In the middle of... what?
>3. Or something wrong in the code ?.
May be. Once again: hard to say without seeing the actual code.
>It is really a simple object creation code, which is failing only some
>cases. There is nothing wrong in the code also since the same code
This claim of yours is in contradiction with possibility 3 above.
>runs fine most of the cases.
"running fine most of the cases" generally is not regarded as a good
proof of "there not being anything wrong in the code." Perhaps you
mean that it is syntactically correct, and that may well be. A whole
another story...
Michele
--
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
.'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,
------------------------------
Date: Thu, 02 Aug 2007 19:50:28 -0700
From: "O. Olson" <olson_ord@yahoo.it>
Subject: Re: Prototypes/Parameters to a Function/Sub-Routine
Message-Id: <1186109428.519788.41430@k79g2000hse.googlegroups.com>
Thanks Paul for your detailed discussion.
On Aug 1, 6:49 pm, Paul Lalli <mri...@gmail.com> wrote:
> What part of perlsub gave you the idea that was valid syntax?
>
No, I did not mean to say that I got this idea from perlsub - just
that I wanted to do something like this - but this was not available
in Perlsub. Anyway now I got the idea.
> UNIVERSAL::isa($obj, "MyClass") or
> croak "Argument to printObject is not a MyClass";
I think this is what I wanted i.e. a way to check if an object is of a
certain class.
Thanks again,
O.O.
------------------------------
Date: Thu, 02 Aug 2007 19:52:57 -0700
From: "O. Olson" <olson_ord@yahoo.it>
Subject: Re: Prototypes/Parameters to a Function/Sub-Routine
Message-Id: <1186109577.832946.170780@l70g2000hse.googlegroups.com>
On Aug 1, 7:26 pm, Michele Dondi <bik.m...@tiscalinet.it> wrote:
>
> No. Perl 5 does not have a type system. Perl 6 will, but it will still
> be optional.
Thanks Michele. I think would wait for Perl 6 - Whenever that's going
to come out.
O.O.
------------------------------
Date: Thu, 02 Aug 2007 19:54:50 -0700
From: "O. Olson" <olson_ord@yahoo.it>
Subject: Re: Prototypes/Parameters to a Function/Sub-Routine
Message-Id: <1186109690.926169.120880@b79g2000hse.googlegroups.com>
On Aug 1, 10:01 pm, "attn.steven....@gmail.com"
<attn.steven....@gmail.com> wrote:
>
> Perhaps you'll find the Params::Util module from CPAN helpful for
> checking parameters.
>
Thanks Steven for pointing this out. I would try this out as soon as I
get the time.
O.O.
------------------------------
Date: Thu, 02 Aug 2007 20:00:45 -0700
From: "O. Olson" <olson_ord@yahoo.it>
Subject: Re: Prototypes/Parameters to a Function/Sub-Routine
Message-Id: <1186110045.102278.160050@19g2000hsx.googlegroups.com>
On Aug 2, 1:50 pm, anno4...@radom.zrz.tu-berlin.de wrote:
>
> It is usually an indication of a design error if a method has to
> care about the class an object comes from. If an object *can* invoke
> a method (through inheritance, for instance) the method should be able
> to handle it.
>
> Anno
Thanks Anno.
Consider if I have to compare two objects the same class. Something
like:
$obj1->diff($obj2)
Where both $obj1 and $obj2 belong to the same class and the function
diff() calculates the difference between them.
In this case diff() needs to be able to ensure that the object passed
as a parameter is of the same common class to be able to calculate the
difference.
O.O.
------------------------------
Date: 03 Aug 2007 01:59:02 GMT
From: xhoster@gmail.com
Subject: SOAP::Lite "service" examples
Message-Id: <20070802215906.104$gS@newsreader.com>
I'm having trouble getting SOAP::Lite "service" method to work properly.
All of the examples I've seen point to wsdl's that are either not found
or just give no response.
http://www.xmethods.net/sd/StockQuoteService.wsdl
http://svc.perl.org/Svc.wsdl
Does anyone have a working example of how to make a call with SOAP::Lite
service which uses a working, publicly available SOAP server?
Also, I haven't been impressed with my experience with SOAP::Lite. When I
try to use it on our internal wsdls I get inscrutable errors, where other
language's SOAP support seems to work fine. Is there something else
designed to make SOAP easy to use that I might want to try? (SOAP::WSDL
uses SOAP::Lite under the hood, so I suspect it will have the same problem.
It refuses to install with cpan under a non-privileged user, so I haven't
yet tested it directly. Trying to fix that will be the next step, unless I
get good suggestions here.)
Thanks,
Xho
--
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service $9.95/Month 30GB
------------------------------
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 712
**************************************