[29059] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 303 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Apr 4 21:10:32 2007

Date: Wed, 4 Apr 2007 18:09:12 -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: 303

Today's topics:
        CGI "working" message/page ?  <uctraing@ultranet.com>
    Re: CGI "working" message/page ?  <jurgenex@hotmail.com>
    Re: CGI "working" message/page ? <spamtrap@dot-app.org>
    Re: CGI "working" message/page ? xhoster@gmail.com
        Directory structure question <bcc@nospam.net>
    Re: Directory structure question usenet@DavidFilmer.com
    Re: fork,exec, and parallel processing <Juha.Laiho@iki.fi>
    Re: Generating serial numbers xhoster@gmail.com
    Re: How to turn off "Caps Lock" from Perl script. <bik.mido@tiscalinet.it>
    Re: How to turn off "Caps Lock" from Perl script. <uri@stemsystems.com>
    Re: How to turn off "Caps Lock" from Perl script. <bik.mido@tiscalinet.it>
    Re: How to turn off "Caps Lock" from Perl script. <lambik@kieffer.nl>
        Limit on number of worksheets using SimpleExcel module <aditya2.gupta@gmail.com>
        Looking for a Perl or (similar) type of script to parse WBible@gmail.com
    Re: Looking for a Perl or (similar) type of script to p <bik.mido@tiscalinet.it>
    Re: Looking for a Perl or (similar) type of script to p <WBible@gmail.com>
    Re: MIME Structure Multipart/Mixed with attachment and  <blaine@worldweb.com>
        Newbie Question - SOAP Modules <alfredocambera@gmail.com>
        Perl reliability? <mikejohnson@volcanomail.com>
    Re: Problem installing Errno <bik.mido@tiscalinet.it>
    Re: Problem installing Errno <joliver@john-oliver.net>
    Re: Problem installing Errno <spamtrap@dot-app.org>
        Testing against a list of values ? <uctraing@ultranet.com>
    Re: Testing against a list of values ? <purlgurl@purlgurl.net>
    Re: Testing against a list of values ? <noreply@gunnar.cc>
    Re: Testing against a list of values ? <uri@stemsystems.com>
    Re: Testing against a list of values ? <purlgurl@purlgurl.net>
    Re: Testing against a list of values ? <spamtrap@dot-app.org>
    Re: Testing against a list of values ? <uri@stemsystems.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Wed, 04 Apr 2007 23:19:38 GMT
From: - Bob - <uctraing@ultranet.com>
Subject: CGI "working" message/page ? 
Message-Id: <09c8131jsaj1kjmmtggablp7g2vqqff3ov@4ax.com>

Question about CGI... maybe a header I should know more about (?).

At some sites, when you start a transaction such as placing an order
or processing a credit card (which may take a bit of physical time)
you get a "working" message of some sort that hangs around for a
while, then the results appear. 

What I am wondering about is how they do this "dual" output -
apparently sending you one web page, then sending you another without
ending the transaction. I can think of some really sloppy ways of
doing this with a refresh, but I get the impression that they are
doing this through some other mechanism I don't know about. 

Is there some way to send the browser some output, keep the connection
open, then send a "clear window" instruction and then send the final
page?

Insight appreciated. 




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

Date: Wed, 04 Apr 2007 23:31:58 GMT
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: CGI "working" message/page ? 
Message-Id: <OzWQh.13287$IY4.12299@trndny03>

- Bob - wrote:
> Question about CGI... maybe a header I should know more about (?).
>
> At some sites, when you start a transaction such as placing an order
> or processing a credit card (which may take a bit of physical time)
> you get a "working" message of some sort that hangs around for a
> while, then the results appear.

I bet this has nothing to do with Perl and neither with CGI. If at all I 
would guess it's some HTTP property. That's were I would start looking if I 
were you.

jue 




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

Date: Wed, 04 Apr 2007 20:50:31 -0400
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: CGI "working" message/page ?
Message-Id: <m2y7l74pbc.fsf@local.wv-www.com>

- Bob - <uctraing@ultranet.com> writes:

> Question about CGI... maybe a header I should know more about (?).
>
> At some sites, when you start a transaction such as placing an order
> or processing a credit card (which may take a bit of physical time)
> you get a "working" message of some sort that hangs around for a
> while, then the results appear. 
>
> What I am wondering about is how they do this "dual" output -
> apparently sending you one web page, then sending you another without
> ending the transaction.

These days, that tends to be AJAX.

Your "starter" script (whether CGI, mod_perl, or whatever...) kicks off
the processing and returns the "skeleton" page. That script is then done,
and it exits.

Some JavaScript in that page hits the server periodically with an AJAX
request - you'll need another "status" script to handle those requests,
and return the status of the processing in either XML or JSON format.
The client then manipulates the "skeleton" page's DOM to update it.

Once your "status" script says "OK, it's all done" (figuratively speaking
of course) the JavaScript then sends the browser on its merry way to the
next page.

Strictly speaking, the high-level concept is off-topic here - it works
the same way whether you're using Perl, Ruby, Java, or anything else on
the server. But if you're having trouble implementing the Perl side of
it, this group can help with that.

If you need help with AJAX or DOM scripting in JavaScript, a JavaScript
group would be a better place to ask about that.

sherm--

-- 
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net


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

Date: 05 Apr 2007 00:56:21 GMT
From: xhoster@gmail.com
Subject: Re: CGI "working" message/page ?
Message-Id: <20070404205624.866$RX@newsreader.com>

- Bob - <uctraing@ultranet.com> wrote:
> Question about CGI... maybe a header I should know more about (?).
>
> At some sites, when you start a transaction such as placing an order
> or processing a credit card (which may take a bit of physical time)
> you get a "working" message of some sort that hangs around for a
> while, then the results appear.
>
> What I am wondering about is how they do this "dual" output -
> apparently sending you one web page, then sending you another without
> ending the transaction.

There are many ways of doing it, most of which have nothing to do with
Perl.  Have you tried looking at the html source of one of the pages you
find particularly nifty, and reverse engineering it?

Myself, I just use the <meta http-equiv="refresh" ....> tag.  Sloppy though
some people may find it, it gets the job done.

Xho

-- 
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service                        $9.95/Month 30GB


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

Date: Thu, 05 Apr 2007 00:31:29 GMT
From: Bryan <bcc@nospam.net>
Subject: Directory structure question
Message-Id: <BrXQh.5114$u03.4901@newssvr21.news.prodigy.net>

Hi,

I have a directory structure like this:

/data/exp/file1/file1.xml
/data/exp/file2/file2.xml
/data/exp/file3/file3.xml
/data/file1/file1.xml
/data/cust/exp/file1/file1.xml

I need to read in the xml files, do some processing on them, and then 
output them to an identical directory structure, but with a different 
root name, like this:

/data_out/exp/file1/file1.xml
/data_out/exp/file2/file2.xml
/data_out/exp/file3/file3.xml
/data_out/file1/file1.xml
/data_out/cust/exp/file1/file1.xml

If the folders at each level do not exist, I would need to create them 
(assuming the xml processing passes some validation check).  So if one 
file fails, it would just skip the creation of that directory.

What is the best way to read in the directory tree, and then recreate it?

Thanks,
B




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

Date: 4 Apr 2007 17:41:07 -0700
From: usenet@DavidFilmer.com
Subject: Re: Directory structure question
Message-Id: <1175733667.467429.10030@d57g2000hsg.googlegroups.com>

On Apr 4, 5:31 pm, Bryan <b...@nospam.net> wrote:

> I need to read in the xml files, do some processing on them, and then
> output them to an identical directory structure, but with a different
> root name

Try the dircopy() method of File::Copy::Recursive, which will clone
the directory structure.

--
The best way to get a good answer is to ask a good question.
David Filmer (http://DavidFilmer.com)



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

Date: Wed, 04 Apr 2007 18:52:03 GMT
From: Juha Laiho <Juha.Laiho@iki.fi>
Subject: Re: fork,exec, and parallel processing
Message-Id: <ev0s08$3s8$1@ichaos2.ichaos-int>

"drew@sundawg.org" <drew@sundawg.org> said:
>I've a need for a script that can query multiple NetBackup servers for
>a clientlist, in parallel (rather than sequentially) if possible.
>
>I've developed the following code, which seems to work, but also seems
>to only run sequentially. What can I do to correct the script so it
>will run the children in parallel?

If I read the code correctly, your reader side (parent) is completely
sequential. You're only forking the childs to run alongside the parent
(which is something you have to do anyway), but you're forking/reading
them sequentially.

So, you'll need to fork separately, before opening the pipes. But to
do this, you'll also have to devise a way the children of this "top"
fork have a way to pass information back to parent. If you just fork
and start a reading loop (before forking the next child), you haven't
won anything. You'll need osme amount of asynchronicity between the
top-level process and the children running the clientlist queries.

So, looking at what the parent does; it loops through the server list.
>for my $server (@serverlist) {
It creates a child.
>        my $pid = open(KID_TO_READ,"-|");
>        print "PID: $pid\n";
>        if ($pid) {
>                # parent
>                @clients = ();
The parent then goes into reading loop.
>                while(<KID_TO_READ>) {
>                        next if (/Windows/);
>                        next if (/^Hardware /);
>                        next if (/^-----/);
>                        my ($hardware,$os,$client_name) = split;
>                        push(@clients,$client_name);
>                        $client_to_master{$client_name} = $server;
>                }
>                close(KID_TO_READ) or warn "Child exited: $?\n";
Which only exits after the child has done all processing,
and the next round in the serverlist loop can only start after this.

The "elsif" branch gets executed just fine (regardless of what was
said in another response), however you're not catching fork failures
(where $pid would actually be undef; see the code example in
"perldoc perlipc"). Fork failures are relatively rare, though -- but
would cause here your parent to execute child code, which would be
pretty confusing to debug.
-- 
Wolf  a.k.a.  Juha Laiho     Espoo, Finland
(GC 3.0) GIT d- s+: a C++ ULSH++++$ P++@ L+++ E- W+$@ N++ !K w !O !M V
         PS(+) PE Y+ PGP(+) t- 5 !X R !tv b+ !DI D G e+ h---- r+++ y++++
"...cancel my subscription to the resurrection!" (Jim Morrison)


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

Date: 05 Apr 2007 00:51:30 GMT
From: xhoster@gmail.com
Subject: Re: Generating serial numbers
Message-Id: <20070404205133.834$9A@newsreader.com>

Ian Wilson <scobloke2@infotop.co.uk> wrote:
> I have a Perl CGI application that handles transactions, writing data to
> a temporary file. I need to keep the data files for a few weeks and so
> need to allocate unique names to them.
>
> 1) I'm currently using the Process-ID but this wraps around rather
> quickly and means filenames get reused on an essentialy unpredictable
> basis. I got one collision in only 143 transactions.
>
> 2) Another method would be timestamps, but I'd probably need to
> distinguish between transactions that arrive a few tens of milliseconds
> apart. So the timestamp would be quite long (YYYYMMDDhhmmss.sss).

If I want some kind of timestamp built into the file name, then I use
the above (down to the second) and append the pid to it.  I rather doubt
your system pid will wrap around within one second.

Otherwise, I just use File::Temp.

Xho

-- 
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service                        $9.95/Month 30GB


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

Date: Wed, 04 Apr 2007 20:24:26 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: How to turn off "Caps Lock" from Perl script.
Message-Id: <vnq713tk6ns563v730dpc6jibfievo7ot7@4ax.com>

On Wed, 04 Apr 2007 12:03:40 -0400, Uri Guttman <uri@stemsystems.com>
wrote:

>  MD> Actually, judging from similar such discussions, I'm appearently the
>  MD> only one to use it on purpose, although on a sparse basis. Oh, and
>  MD> when I do, I *do* happen to forget it on, too, which is the problem
>  MD> many people see in it. Whatever, I'm not removing it. No way!!
>
>anyone ever heard of xmodmap? easy way to redfine keys so capslock

Indeed that's what people on those discussions I implicitly referred
to claim as well: xmodmap and similar tools. Anyhow what I was
claiming is that I *do* find the damn key useful. Not terribly useful.
Slightly useful. But useful.

>becomes control like it was before ibm ruined the keyboard. know why
>they did that? capslock was a useful key on manual typewriters since you
>had to really push hard on shift to lift up the key carriage. when

Yes, it was somewhat obvious to me that it came from that. I'm young,
but not as much as not to have ever seen a manual typewriter. And with
them you also used all caps more often than nowadays, e.g. for titles.

>electric typewriters came out they kept that evn though it wasn't hard
>to push shift anymore (especially with the selectric golf ball where
>keys were all electronic). so when ibm created the pc they wanted to
>keep it just like the office typewriter to ease conversions. well, they
>kept capslock but needed a control key so they put that in a lousy
>place. now no one in their right mind needs capslock on a computer

No, no one *needs* it. And I understand your, and all those other
people's concerns. But I find it convenient whenever I have to type
more than say three consecutive uppercase letters. For example it
certainly *faster* for me to press caps lock, write "BEGIN" and press
caps lock again than keeping shift pressed and also press the
individual keys corresponding to the letters of "BEGIN". To each
his/her own...

>(other than spammers or aolers). but it has remained there wasting space
>which should rightfully be control. i swap capslock and control when i
>can with xmodmap. and i use sun keyboards when i can which are much
>better than any pc/mac keyboard and has control and escape where they
>belong.

I know I am annoying and you won't answer anyway, but... by any chance
did you remap the shift keys as well?


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: Wed, 04 Apr 2007 15:26:52 -0400
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: How to turn off "Caps Lock" from Perl script.
Message-Id: <x7mz1ogcub.fsf@mail.sysarch.com>

>>>>> "MD" == Michele Dondi <bik.mido@tiscalinet.it> writes:


  MD> No, no one *needs* it. And I understand your, and all those other
  MD> people's concerns. But I find it convenient whenever I have to type
  MD> more than say three consecutive uppercase letters. For example it
  MD> certainly *faster* for me to press caps lock, write "BEGIN" and press
  MD> caps lock again than keeping shift pressed and also press the
  MD> individual keys corresponding to the letters of "BEGIN". To each
  MD> his/her own...

holding shift down for 5 letters is easy enough. also in emacs it is
trivial to change casing of a word or paragraph.

  MD> I know I am annoying and you won't answer anyway, but... by any chance
  MD> did you remap the shift keys as well?

no. i do use shift for symbols and when writing documentation and code
and other writings. i just don't use it as much when doing email and
usenet. just an old habit.

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: Wed, 04 Apr 2007 23:39:44 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: How to turn off "Caps Lock" from Perl script.
Message-Id: <5o6813lb2estekdg889pa2dm9aji09bc0o@4ax.com>

On Wed, 04 Apr 2007 15:26:52 -0400, Uri Guttman <uri@stemsystems.com>
wrote:

>  MD> I know I am annoying and you won't answer anyway, but... by any chance
>  MD> did you remap the shift keys as well?
>
>no. i do use shift for symbols and when writing documentation and code
>and other writings. i just don't use it as much when doing email and
>usenet. just an old habit.

I know. I will continue to occasionally annoy you about this, though!


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, 5 Apr 2007 00:05:49 +0200
From: "Lambik" <lambik@kieffer.nl>
Subject: Re: How to turn off "Caps Lock" from Perl script.
Message-Id: <46142038$0$711$5fc3050@dreader2.news.tiscali.nl>

"katera" <katera@tovle.ct> wrote in message
news:euvlkg$bh0$1@ss408.t-com.hr...
> How to turn off "Caps Lock" from Perl script.

No idea how to do it in perl but given your newsreader here is some windows
code (98 and above) to toggle the caps lock key.

#include <stdio.h>
#include <windows.h>

int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine,
INT nCmdShow)
{
    INPUT input[2];
    ZeroMemory(input, sizeof(input));
    input[0].type = input[1].type = INPUT_KEYBOARD;
    input[0].ki.wVk  = input[1].ki.wVk = VK_CAPITAL;
    input[1].ki.dwFlags = KEYEVENTF_KEYUP;
    SendInput(2, input, sizeof(INPUT));

 return 0;
}




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

Date: 4 Apr 2007 14:22:36 -0700
From: "adi" <aditya2.gupta@gmail.com>
Subject: Limit on number of worksheets using SimpleExcel module
Message-Id: <1175721756.020655.111610@w1g2000hsg.googlegroups.com>

Hi all,

I am currently using the SimpleExcel / SimpleExcel::Big module to
write a excel spreadsheet with number of worksheets from perl. It
seems I have hit the limit on number of worksheets I can add (around
230) using this module.

Is this a real limit of Excel or some other module would help me get
around this problem and add a greater number of worksheets.

thanks for your help
adi



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

Date: 4 Apr 2007 13:27:38 -0700
From: WBible@gmail.com
Subject: Looking for a Perl or (similar) type of script to parse XML files for errors
Message-Id: <1175718458.155969.305980@w1g2000hsg.googlegroups.com>

I'm looking for a Perl script ( or assistance on how to write one) for
performing a a pattern match in XML data files to search for the Error
message and match them w/ the actual offending data records.  ie. The
error search string would be "Error system"  which displays the
applicable error message immediately following. Ideally it would
redirect the errors messages to an output file w/ the data record ids
matched in a prompted XML tag.

Does anyone have something similar that I could use as a base? I
realize that grep will do some of this but it's a little more
difficult to parse given the length of the java error messages.

Thanks,

Will



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

Date: Wed, 04 Apr 2007 23:43:35 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: Looking for a Perl or (similar) type of script to parse XML files for errors
Message-Id: <5t6813li9ci5ad9rsbvap9t0lidd7di5im@4ax.com>

On 4 Apr 2007 13:27:38 -0700, WBible@gmail.com wrote:

>I'm looking for a Perl script ( or assistance on how to write one) for

http://groups.google.com/group/comp.lang.perl.misc/search?q=parse+xml&scoring=d&num=100

>Does anyone have something similar that I could use as a base? I
>realize that grep will do some of this but it's a little more
>difficult to parse given the length of the java error messages.

java?!?


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: 4 Apr 2007 15:32:20 -0700
From: "Will" <WBible@gmail.com>
Subject: Re: Looking for a Perl or (similar) type of script to parse XML files for errors
Message-Id: <1175725940.603847.326850@l77g2000hsb.googlegroups.com>

On Apr 4, 5:43 pm, Michele Dondi <bik.m...@tiscalinet.it> wrote:
> On 4 Apr 2007 13:27:38 -0700, WBi...@gmail.com wrote:
>
> >I'm looking for a Perl script ( or assistance on how to write one) for
>
> http://groups.google.com/group/comp.lang.perl.misc/search?q=parse+xml...
>
> >Does anyone have something similar that I could use as a base? I
> >realize that grep will do some of this but it's a little more
> >difficult to parse given the length of the java error messages.
>
> java?!?
>
> 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,

The app. was written in Java and produces an error file/log w/ the
error messages and the XML data section applied to it. I'm not a java
guy but are you asking if java is the way to go here? Thanks



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

Date: 4 Apr 2007 13:23:55 -0700
From: "blaine@worldweb.com" <blaine@worldweb.com>
Subject: Re: MIME Structure Multipart/Mixed with attachment and Multipart/Alternative
Message-Id: <1175718235.883435.189600@n76g2000hsh.googlegroups.com>

Well after reading and re-reading the docs I finally found a solution
to my problem. I just wanted to post it  so hopefully it will make
someone else's life easier.

When creating the Entity for the multipart/alternative do not have it
specified as a top level entity. Instead use TOP => 0;

Below is the solution...

use MIME::Entity;

my $top = MIME::Entity->build('Type' => "multipart/mixed",
                                  'From' => 'fake@nowhere.com',
                                   'To'  => 'test@nowhere.com',
                               'Subject' => 'Test Message' );


### Attach a plain text file
$top->attach(Path     => "t.txt",
             Type     => "text/plain",
             Disposition => "attachment",
             Encoding => "7bit");


### Create an new entity to contain both HTML and Text versions of the
### message
my $ent = MIME::Entity->build('Type' => "multipart/alternative",
                              'Top' => 0,
);

## Attach the text/plain entity to the multipart/alternative entity
$ent->attach(Data => 'test text/plain Message',
             Type        => 'text/plain',
             Encoding => "7bit");

## Attach the text/html entity to the multipart/alternative entity
$ent->attach(Data => '<html><body>test <h3>text/html</h3> Message</
body></html>',
             Type        => 'text/html',
             Encoding => "7bit");


### Attach the Multipart/Alternative Entity to the Multipart/Mixed
Entity
$top->add_part( $ent );

$top->dump_skeleton(\*STDERR);

#open MAIL, "| /usr/sbin/sendmail -t -f \"test@nowhere.com\"" or die
"open: $ !";
#$top->print(\*MAIL);
#close MAIL;




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

Date: 4 Apr 2007 15:11:43 -0700
From: "Alfredo Cambera" <alfredocambera@gmail.com>
Subject: Newbie Question - SOAP Modules
Message-Id: <1175724703.522897.32290@d57g2000hsg.googlegroups.com>

Hi guys, i had just started to learn Perl a few week ago and now I'm
planning to create an application for remote administration of certain
service.

Searching in CPAN i founded a lot  of modules related to SOAP but I'm
not sure witch one should i choose. Right now I'm playing with
"SOAP::Lite"[1] and looks great, but I'd like to hear your
recommendations

Thanks in advance,

[1] - http://www.soaplite.com/



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

Date: 4 Apr 2007 17:15:03 -0700
From: "MikeJohnson" <mikejohnson@volcanomail.com>
Subject: Perl reliability?
Message-Id: <1175732103.020743.215390@l77g2000hsb.googlegroups.com>

Hi,

I have written a Perl application of around 4000 lines.

It parses through a log file, builds up a large hash, then writes to a
SQL Server database using DBI.

For efficiency, I have broken up the processing into two ithreads.
The main thread parses the log file and writes scalars to a
Thread::Queue.
A database writing thread reads the scalars from the Thread::Queue,
and writes records to a local SQL Server database using DBI.

The program uses a second DBI connection to a SQLite database,
and Win32::Mutexes to coordinate multiple instances.
It also writes to the Windows Event Log with Win32::EventLog.

We are running ActiveState Perl version 820 on Windows XP.

THE PROBLEM IS THAT PERL ITSELF KEEPS CRASHING!

"Application Error Application Failure  perl.exe 5.8.8.819 in
perl58.dll 5.8.8.819 at offset 00085af7 perl.exe 5.8.8.819 perl58.dll
5.8.8.819 00085af7"

These crashes are intermittent. Sometimes the program will crash on
one log file, and sometimes it won't. :(

My questions are-

1. Is Perl more stable on other platforms?

2. Or should we drop the money and purchase ActiveState Enterprise
Edition Perl, with hopefully good support?

3. If the program has bugs could this be the cause of the the Perl
interpreter crashing?
   Or does Perl try to insulate application programmers from errors
akin to a Java or .NET runtime?


Thank you very much for any advice or recommendations,

Mike



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

Date: Wed, 04 Apr 2007 20:35:24 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: Problem installing Errno
Message-Id: <0vr7139cgkhprbd68ajkqsn0k7og2qhs12@4ax.com>

On 04 Apr 2007 17:26:59 GMT, John Oliver <joliver@john-oliver.net>
wrote:

>Subject: Problem installing Errno

Huh?!? Isn't it a core module?


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: 04 Apr 2007 21:11:57 GMT
From: John Oliver <joliver@john-oliver.net>
Subject: Re: Problem installing Errno
Message-Id: <slrnf1854t.4tl.joliver@ns.sdsitehosting.net>

On Wed, 04 Apr 2007 20:35:24 +0200, Michele Dondi wrote:
> On 04 Apr 2007 17:26:59 GMT, John Oliver <joliver@john-oliver.net>
> wrote:
>
>>Subject: Problem installing Errno
>
> Huh?!? Isn't it a core module?

Dunno.  Is it?

Either way... it isn't working, and I'd like to find out how to satisfy
the dependancy.

-- 
* John Oliver                              http://www.john-oliver.net/ *


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

Date: Wed, 04 Apr 2007 18:20:58 -0400
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: Problem installing Errno
Message-Id: <m2abxn6at1.fsf@local.wv-www.com>

John Oliver <joliver@john-oliver.net> writes:

> On Wed, 04 Apr 2007 20:35:24 +0200, Michele Dondi wrote:
>> On 04 Apr 2007 17:26:59 GMT, John Oliver <joliver@john-oliver.net>
>> wrote:
>>
>>>Subject: Problem installing Errno
>>
>> Huh?!? Isn't it a core module?
>
> Dunno.  Is it?
>
> Either way... it isn't working, and I'd like to find out how to satisfy
> the dependancy.

Michele's right - it's core since at least as far back as 5.6.0, the oldest
Perl I have on hand to check.

Looks like you're not using the UNINST=1 option to "make install". That may
be the problem.

Installing an update from CPAN without using UNINST=1 will leave the core
version in place, and since the core module directory precedes the site
directory, the core module will be what's found when you use() it. The
UNINST=1 option prevents this by deleting older core versions when you
replace them with newer non-core versions of the same module.

sherm--

-- 
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net


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

Date: Wed, 04 Apr 2007 23:33:37 GMT
From: - Bob - <uctraing@ultranet.com>
Subject: Testing against a list of values ?
Message-Id: <jkc813d97s5kg5t3q0r9c8tm4hak44sieh@4ax.com>

I coded the following, which works but is lengthy:

	if ( ($temp ne "a") 
		and( $temp ne "x" )
		and ( $temp ne "y" ) ){ ....}

What's a more Perl-like and compact way to code something like this ? 




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

Date: Wed, 04 Apr 2007 16:45:57 -0700
From: Purl Gurl <purlgurl@purlgurl.net>
Subject: Re: Testing against a list of values ?
Message-Id: <_OCdnb9UcNwppYnbnZ2dnUVZ_s-rnZ2d@giganews.com>

Bob wrote:

> I coded the following, which works but is lengthy:

> 	if ( ($temp ne "a") 
> 		and( $temp ne "x" )
> 		and ( $temp ne "y" ) ){ ....}

> What's a more Perl-like and compact way to code something like this ? 

#!perl

while (<DATA>)
  {
   if ($_ =~ tr/axy// == 0)
    { print $_; }
  }

__DATA__
a
b
c
x
y
z

PRINTED RESULTS:

b
c
z


Purl Gurl


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

Date: Thu, 05 Apr 2007 01:58:15 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Testing against a list of values ?
Message-Id: <57isgrF2d16olU1@mid.individual.net>

- Bob - wrote:
> I coded the following, which works but is lengthy:
> 
> 	if ( ($temp ne "a") 
> 		and( $temp ne "x" )
> 		and ( $temp ne "y" ) ){ ....}
> 
> What's a more Perl-like and compact way to code something like this ? 

Check out the grep() function.

     perldoc -f grep

if ( grep( $temp eq $_, @values ) == 0 ) { ... }

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl


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

Date: Wed, 04 Apr 2007 20:37:27 -0400
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: Testing against a list of values ?
Message-Id: <x7mz1nejw8.fsf@mail.sysarch.com>

>>>>> "PG" == Purl Gurl <purlgurl@purlgurl.net> writes:

  PG> Bob wrote:
  >> I coded the following, which works but is lengthy:

  >> if ( ($temp ne "a") 		and( $temp ne "x" )
  >> and ( $temp ne "y" ) ){ ....}

  >> What's a more Perl-like and compact way to code something like this ?

  PG> #!perl

  PG> while (<DATA>)
  PG>   {
  PG>    if ($_ =~ tr/axy// == 0)
  PG>     { print $_; }
  PG>   }

as usual moronzilla gets it wrong. try that code with 'ax' or any string
of length > 1 and at least one of 'axy'. it won't behave as the OP
wants.

the correct answer is to use a hash. plenty of examples in this group so
search it with google.

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: Wed, 04 Apr 2007 17:52:36 -0700
From: Purl Gurl <purlgurl@purlgurl.net>
Subject: Re: Testing against a list of values ?
Message-Id: <AYGdnRXC4-TO1YnbnZ2dnUVZ_sOknZ2d@giganews.com>

Uri Guttman wrote:

> Purl Gurl wrote:
>> Bob wrote:

>>> I coded the following, which works but is lengthy:

>>> if ( ($temp ne "a") 		and( $temp ne "x" )
>>> and ( $temp ne "y" ) ){ ....}

>>> What's a more Perl-like and compact way to code something like this ?

>> #!perl

>> while (<DATA>)
>>   {
>>    if ($_ =~ tr/axy// == 0)
>>     { print $_; }
>>   }

> as usual moronzilla gets it wrong. try that code with 'ax' or any string
> of length > 1 and at least one of 'axy'. it won't behave as the OP
> wants.

Irrelevant. Your comments do not comply with the originating author's
stated parameters. You are practicing deceit, more succinct, you are
lying to readers which is much in keeping with your years long history
and reputation as being amongst the worst of trolls spreading ignorance
and discontent within this discussion group.

Purl Gurl


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

Date: Wed, 04 Apr 2007 20:52:46 -0400
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: Testing against a list of values ?
Message-Id: <m2tzvv4p7l.fsf@local.wv-www.com>

- Bob - <uctraing@ultranet.com> writes:

> I coded the following, which works but is lengthy:
>
> 	if ( ($temp ne "a") 
> 		and( $temp ne "x" )
> 		and ( $temp ne "y" ) ){ ....}
>
> What's a more Perl-like and compact way to code something like this ?

You could do a regex match against a character class of a, x, and y:

    if ( $temp !~ /^[axy]$/ ) {
        # do stuff
    }

sherm--

-- 
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net


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

Date: Wed, 04 Apr 2007 21:02:48 -0400
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: Testing against a list of values ?
Message-Id: <x7abxneipz.fsf@mail.sysarch.com>

>>>>> "PG" == Purl Gurl <purlgurl@purlgurl.net> writes:

  PG> Uri Guttman wrote:
  >> Purl Gurl wrote:
  >>> Bob wrote:

  >>>> I coded the following, which works but is lengthy:

  >>>> if ( ($temp ne "a") 		and( $temp ne "x" )
  >>>> and ( $temp ne "y" ) ){ ....}

  >>>> What's a more Perl-like and compact way to code something like this ?

  >>> #!perl

  >>> while (<DATA>)
  >>> {
  >>> if ($_ =~ tr/axy// == 0)
  >>> { print $_; }
  >>> }

  >> as usual moronzilla gets it wrong. try that code with 'ax' or any string
  >> of length > 1 and at least one of 'axy'. it won't behave as the OP
  >> wants.

  PG> Irrelevant. Your comments do not comply with the originating author's
  PG> stated parameters. You are practicing deceit, more succinct, you are
  PG> lying to readers which is much in keeping with your years long history
  PG> and reputation as being amongst the worst of trolls spreading ignorance
  PG> and discontent within this discussion group.

he never stated that the input would always be a single character. you
assumed so in your broken code. so your code is wrong as it usually is
as it doesn't account for bad data. it does account for bad code as it
came from you.

as for trolling and such, when have you last published a cpan module,
gave a talk at a conference, been hired to train people in perl or any
of a number of perl things? not in anyone's lifetime here. so please go
back to your loonie been as you did for a blessed few months.

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: 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 303
**************************************


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