[30505] in Perl-Users-Digest
Perl-Users Digest, Issue: 1748 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Jul 27 03:09:43 2008
Date: Sun, 27 Jul 2008 00:09:06 -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 Sun, 27 Jul 2008 Volume: 11 Number: 1748
Today's topics:
dynamic scoped variables in the debugger <user@serverrb.net>
Re: EPIC and "my" variables rupert@web-ideas.com.au
Re: FAQ 3.10 Is there an IDE or Windows Perl Editor? <bill@ts1000.us>
Re: FAQ 4.2 Why is int() broken? <hjp-usenet2@hjp.at>
How come? RE matches, but does not set $^R <JustMe@somewhere.de>
new CPAN modules on Sun Jul 27 2008 (Randal Schwartz)
Re: Perl - approach to query https website for code & p (Zak B. Elep)
Re: what is the expression mean? <user@serverrb.net>
Why stdin lose after new Thread <miaohaoz@ustc.edu>
Re: Why stdin lose after new Thread <zentara@highstream.net>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sat, 26 Jul 2008 20:43:11 -0500
From: Nathan <user@serverrb.net>
Subject: dynamic scoped variables in the debugger
Message-Id: <7oQik.15491$xZ.15150@nlpi070.nbdc.sbc.com>
Hi,
I'm running Perl v5.8.8 compiled for linux. I was reading about the perl
debugger and ran the following script with the command "perl -d":
1 #!/ usr/bin/perl
2 $_ = "foo";
3 /foo/;
4
5 print "$&";
6 print "\n";
As expected it prints "foo" before the newline, and if I check the value
of $& in the debugger it does show "foo". However, if I omit line 5 of
the program then the debugger says $& is undefined when it reaches the
last print statement. I don't understand how this can be, is there some
subtlety to the way the debugger treats dynamically scoped variables?
Any insight anyone can offer would be great, thanks.
-Nathan
------------------------------
Date: Sat, 26 Jul 2008 06:28:48 -0700 (PDT)
From: rupert@web-ideas.com.au
Subject: Re: EPIC and "my" variables
Message-Id: <f5db8e2d-4893-44d6-90cc-cb6a1be28a05@u6g2000prc.googlegroups.com>
I gave up on Ubuntu and jumped accross to Vista to develope. Had a
couple of problems which I had to over come. First - Activestate 5.10
has got a couple of library problems, PadWalker and DBD::mysql are not
normally available for it. I had to specify full paths to repositories
for both:
ppm install http://cpan.uwinnipeg.ca/PPMPackages/10xx/DBD-mysql.ppd
ppm install http://www.bribes.org/perl/ppm/PadWalker.ppd
after this installation I included EPIC and had no problems with 5.10
- also I was initially x64 but down graded to x86 to the gui version.
however both have the same library aflictions. Hope that helps Steve.
But I'd still like somebody to advise if they had Ubuntu work
successfully for Perl/EPIC dev...
------------------------------
Date: Sat, 26 Jul 2008 14:05:02 -0700 (PDT)
From: Bill H <bill@ts1000.us>
Subject: Re: FAQ 3.10 Is there an IDE or Windows Perl Editor?
Message-Id: <524ab1c2-63e0-4221-9008-2ba16da20c06@m36g2000hse.googlegroups.com>
On Jul 26, 3:03=A0pm, PerlFAQ Server <br...@stonehenge.com> wrote:
> This is an excerpt from the latest version perlfaq3.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 athttp://faq.perl.org.
>
> --------------------------------------------------------------------
>
> 3.10: Is there an IDE or Windows Perl Editor?
>
> =A0 =A0 Perl programs are just plain text, so any editor will do.
>
> =A0 =A0 If you're on Unix, you already have an IDE--Unix itself. The UNIX
> =A0 =A0 philosophy is the philosophy of several small tools that each do =
one
> =A0 =A0 thing and do it well. It's like a carpenter's toolbox.
>
> =A0 =A0 If you want an IDE, check the following (in alphabetical order, n=
ot
> =A0 =A0 order of preference):
>
> =A0 =A0 Eclipse
> =A0 =A0 =A0 =A0http://e-p-i-c.sf.net/
>
> =A0 =A0 =A0 =A0 The Eclipse Perl Integration Project integrates Perl
> =A0 =A0 =A0 =A0 editing/debugging with Eclipse.
>
> =A0 =A0 Enginsite
> =A0 =A0 =A0 =A0http://www.enginsite.com/
>
> =A0 =A0 =A0 =A0 Perl Editor by EngInSite is a complete integrated develop=
ment
> =A0 =A0 =A0 =A0 environment (IDE) for creating, testing, and debugging Pe=
rl scripts;
> =A0 =A0 =A0 =A0 the tool runs on Windows 9x/NT/2000/XP or later.
>
> =A0 =A0 Komodo
> =A0 =A0 =A0 =A0http://www.ActiveState.com/Products/Komodo/
>
> =A0 =A0 =A0 =A0 ActiveState's cross-platform (as of October 2004, that's =
Windows,
> =A0 =A0 =A0 =A0 Linux, and Solaris), multi-language IDE has Perl support,=
including
> =A0 =A0 =A0 =A0 a regular expression debugger and remote debugging.
>
> =A0 =A0 Open Perl IDE
> =A0 =A0 =A0 =A0http://open-perl-ide.sourceforge.net/
>
> =A0 =A0 =A0 =A0 Open Perl IDE is an integrated development environment fo=
r writing
> =A0 =A0 =A0 =A0 and debugging Perl scripts with ActiveState's ActivePerl
> =A0 =A0 =A0 =A0 distribution under Windows 95/98/NT/2000.
>
> =A0 =A0 OptiPerl
> =A0 =A0 =A0 =A0http://www.optiperl.com/
>
> =A0 =A0 =A0 =A0 OptiPerl is a Windows IDE with simulated CGI environment,=
including
> =A0 =A0 =A0 =A0 debugger and syntax highlighting editor.
>
> =A0 =A0 PerlBuilder
> =A0 =A0 =A0 =A0http://www.solutionsoft.com/perl.htm
>
> =A0 =A0 =A0 =A0 PerlBuidler is an integrated development environment for =
Windows
> =A0 =A0 =A0 =A0 that supports Perl development.
>
> =A0 =A0 visiPerl+
> =A0 =A0 =A0 =A0http://helpconsulting.net/visiperl/
>
> =A0 =A0 =A0 =A0 From Help Consulting, for Windows.
>
> =A0 =A0 Visual Perl
> =A0 =A0 =A0 =A0http://www.activestate.com/Products/Visual_Perl/
>
> =A0 =A0 =A0 =A0 Visual Perl is a Visual Studio.NET plug-in from ActiveSta=
te.
>
> =A0 =A0 Zeus
> =A0 =A0 =A0 =A0http://www.zeusedit.com/lookmain.html
>
> =A0 =A0 =A0 =A0 Zeus for Window is another Win32 multi-language editor/ID=
E that
> =A0 =A0 =A0 =A0 comes with support for Perl:
>
> =A0 =A0 For editors: if you're on Unix you probably have vi or a vi clone
> =A0 =A0 already, and possibly an emacs too, so you may not need to downlo=
ad
> =A0 =A0 anything. In any emacs the cperl-mode (M-x cperl-mode) gives you =
perhaps
> =A0 =A0 the best available Perl editing mode in any editor.
>
> =A0 =A0 If you are using Windows, you can use any editor that lets you wo=
rk with
> =A0 =A0 plain text, such as NotePad or WordPad. Word processors, such as
> =A0 =A0 Microsoft Word or WordPerfect, typically do not work since they i=
nsert
> =A0 =A0 all sorts of behind-the-scenes information, although some allow y=
ou to
> =A0 =A0 save files as "Text Only". You can also download text editors des=
igned
> =A0 =A0 specifically for programming, such as Textpad (http://www.textpad=
.com/
> =A0 =A0 ) and UltraEdit (http://www.ultraedit.com/), among others.
>
> =A0 =A0 If you are using MacOS, the same concerns apply. MacPerl (for Cla=
ssic
> =A0 =A0 environments) comes with a simple editor. Popular external editor=
s are
> =A0 =A0 BBEdit (http://www.bbedit.com/) or Alpha (
> =A0 =A0http://www.his.com/~jguyer/Alpha/Alpha8.html). MacOS X users can u=
se
> =A0 =A0 Unix editors as well.
>
> =A0 =A0 GNU Emacs
> =A0 =A0 =A0 =A0http://www.gnu.org/software/emacs/windows/ntemacs.html
>
> =A0 =A0 MicroEMACS
> =A0 =A0 =A0 =A0http://www.microemacs.de/
>
> =A0 =A0 XEmacs
> =A0 =A0 =A0 =A0http://www.xemacs.org/Download/index.html
>
> =A0 =A0 Jedhttp://space.mit.edu/~davis/jed/
>
> =A0 =A0 or a vi clone such as
>
> =A0 =A0 Elvis
> =A0 =A0 =A0 =A0ftp://ftp.cs.pdx.edu/pub/elvis/http://www.fh-wedel.de/elvi=
s/
>
> =A0 =A0 Vile
> =A0 =A0 =A0 =A0http://dickey.his.com/vile/vile.html
>
> =A0 =A0 Vimhttp://www.vim.org/
>
> =A0 =A0 For vi lovers in general, Windows or elsewhere:
>
> =A0 =A0 =A0 =A0 =A0 =A0http://www.thomer.com/thomer/vi/vi.html
>
> =A0 =A0 nvi (http://www.bostic.com/vi/, available from CPAN in src/misc/)=
is
> =A0 =A0 yet another vi clone, unfortunately not available for Windows, bu=
t in
> =A0 =A0 UNIX platforms you might be interested in trying it out, firstly =
because
> =A0 =A0 strictly speaking it is not a vi clone, it is the real vi, or the=
new
> =A0 =A0 incarnation of it, and secondly because you can embed Perl inside=
it to
> =A0 =A0 use Perl as the scripting language. nvi is not alone in this, tho=
ugh: at
> =A0 =A0 least also vim and vile offer an embedded Perl.
>
> =A0 =A0 The following are Win32 multilanguage editor/IDESs that support P=
erl:
>
> =A0 =A0 Codewright
> =A0 =A0 =A0 =A0http://www.borland.com/codewright/
>
> =A0 =A0 MultiEdit
> =A0 =A0 =A0 =A0http://www.MultiEdit.com/
>
> =A0 =A0 SlickEdit
> =A0 =A0 =A0 =A0http://www.slickedit.com/
>
> =A0 =A0 There is also a toyedit Text widget based editor written in Perl =
that is
> =A0 =A0 distributed with the Tk module on CPAN. The ptkdb (
> =A0 =A0http://ptkdb.sourceforge.net/) is a Perl/tk based debugger that ac=
ts as
> =A0 =A0 a development environment of sorts. Perl Composer (
> =A0 =A0http://perlcomposer.sourceforge.net/) is an IDE for Perl/Tk GUI
> =A0 =A0 creation.
>
> =A0 =A0 In addition to an editor/IDE you might be interested in a more po=
werful
> =A0 =A0 shell environment for Win32. Your options include
>
> =A0 =A0 Bash
> =A0 =A0 =A0 =A0 from the Cygwin package (http://sources.redhat.com/cygwin=
/)
>
> =A0 =A0 Ksh from the MKS Toolkit (http://www.mkssoftware.com/), or the Bo=
urne
> =A0 =A0 =A0 =A0 shell of the U/WIN environment (
> =A0 =A0 =A0 =A0http://www.research.att.com/sw/tools/uwin/)
>
> =A0 =A0 Tcsh
> =A0 =A0 =A0 =A0ftp://ftp.astron.com/pub/tcsh/, see also
> =A0 =A0 =A0 =A0http://www.primate.wisc.edu/software/csh-tcsh-book/
>
> =A0 =A0 Zshhttp://www.zsh.org/
>
> =A0 =A0 MKS and U/WIN are commercial (U/WIN is free for educational and r=
esearch
> =A0 =A0 purposes), Cygwin is covered by the GNU Public License (but that
> =A0 =A0 shouldn't matter for Perl use). The Cygwin, MKS, and U/WIN all co=
ntain
> =A0 =A0 (in addition to the shells) a comprehensive set of standard UNIX =
toolkit
> =A0 =A0 utilities.
>
> =A0 =A0 If you're transferring text files between Unix and Windows using =
FTP be
> =A0 =A0 sure to transfer them in ASCII mode so the ends of lines are
> =A0 =A0 appropriately converted.
>
> =A0 =A0 On Mac OS the MacPerl Application comes with a simple 32k text ed=
itor
> =A0 =A0 that behaves like a rudimentary IDE. In contrast to the MacPerl
> =A0 =A0 Application the MPW Perl tool can make use of the MPW Shell itsel=
f as an
> =A0 =A0 editor (with no 32k limit).
>
> =A0 =A0 Affrus
> =A0 =A0 =A0 =A0 is a full Perl development environment with full debugger=
support (
> =A0 =A0 =A0 =A0http://www.latenightsw.com).
>
> =A0 =A0 Alpha
> =A0 =A0 =A0 =A0 is an editor, written and extensible in Tcl, that nonethe=
less has
> =A0 =A0 =A0 =A0 built in support for several popular markup and programmi=
ng
> =A0 =A0 =A0 =A0 languages including Perl and HTML (
> =A0 =A0 =A0 =A0http://www.his.com/~jguyer/Alpha/Alpha8.html).
>
> =A0 =A0 BBEdit and BBEdit Lite
> =A0 =A0 =A0 =A0 are text editors for Mac OS that have a Perl sensitivity =
mode (
> =A0 =A0 =A0 =A0http://web.barebones.com/).
>
> --------------------------------------------------------------------
>
> The perlfaq-workers, a group of volunteers, maintain the perlfaq. They
> are not necessarily experts in every domain where Perl might show up,
> so please include as much information as possible and relevant in any
> corrections. The perlfaq-workers also don't have access to every
> operating system or platform, so please include relevant details for
> corrections to examples that do not work on particular platforms.
> Working code is greatly appreciated.
>
> If you'd like to help maintain the perlfaq, see the details in
> perlfaq.pod.
I would suggest adding ConText to this for windows (http://
www.contexteditor.org/) I have been using it and am starting to like
it more and more.
Bill H
------------------------------
Date: Sun, 27 Jul 2008 08:31:40 +0200
From: "Peter J. Holzer" <hjp-usenet2@hjp.at>
Subject: Re: FAQ 4.2 Why is int() broken?
Message-Id: <slrng8o5ic.5ie.hjp-usenet2@hrunkner.hjp.at>
On 2008-07-25 19:00, szr <szrRE@szromanMO.comVE> wrote:
> Peter J. Holzer wrote:
>> On 2008-07-24 16:19, szr <szrRE@szromanMO.comVE> wrote:
>>> Seems you need the extra precision that building Perl with "long
>>> double" support
>>
>> No. The extra precision doesn't help. As I argued below it's just
>> coincidence that error isn't noticable in this case. if you use other
>> numbers instead of 0.6 and 0.2, you will discover some where the
>> result is "wrong" even with 96 bits. Indeed you may find some where
>> the result is correct for 64 bits and wrong for 96 bits.
>
> Is there any way to get a lore more precision than 96 or 128 bits,
Please get it into your head that extra precision *does* *not* solve
this problem. To express 1/10 in binary you need an infinite number of
digits, just like you need an infinite number of digits to express 1/3
in decimal.
If you need to express decimals exactly, use decimal numbers. If you
need to express rational numbers exactly, use rational numbers.
> or is it better to write (or find) a module that does "moving"
> calculations, kind of like a certain Linux console program whose name
> I cannot recall.
>
You mean "bc". I'm not sure what you mean by "moving" calculations. Bc
does decimal fixed point arithmetic with arbitrary precision. There are
a number of perl modules which do aribtrary precision: Math::BigInt,
Math::BigFloat and Math::BigRat.
hp
------------------------------
Date: Sat, 26 Jul 2008 20:42:26 +0200
From: Hartmut Camphausen <JustMe@somewhere.de>
Subject: How come? RE matches, but does not set $^R
Message-Id: <MPG.22f58e63180141ca98968d@news.t-online.de>
Hi all,
Assume the following REs:
# this should match B, followed by e.g. '=cc', and set $^R to 'got B':
/(B(?:=c*))(?{'got B'})/
# so should this, but match '=c*' only once, if any, and set $^R:
/(B(?:=c*)?)(?{'got B'})/
Both expressions match as expected (and set $1), BUT: the second one
does n o t set $^R as it should do.
However, if I say
/(?>(B(?:=c+)?)(?{...})/
i.e. force Perl to eat up anything it matches, $^R is correctly set.
How come?
Quite clueless, Hartmut
--
------------------------------------------------
Hartmut Camphausen h.camp[bei]textix[punkt]de
------------------------------
Date: Sun, 27 Jul 2008 04:42:21 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Sun Jul 27 2008
Message-Id: <K4nEEL.DK7@zorch.sf-bay.org>
The following modules have recently been added to or updated in the
Comprehensive Perl Archive Network (CPAN). You can install them using the
instructions in the 'perlmodinstall' page included with your Perl
distribution.
AnyEvent-GPSD-1.0
http://search.cpan.org/~mlehmann/AnyEvent-GPSD-1.0/
event based interface to GPSD
----
App-PersistentSSH-0.01
http://search.cpan.org/~nuffin/App-PersistentSSH-0.01/
Kick an ssh control master around on OSX using scutil
----
App-PersistentSSH-0.02
http://search.cpan.org/~nuffin/App-PersistentSSH-0.02/
Kick an ssh control master around on OSX using scutil
----
App-PersistentSSH-0.03
http://search.cpan.org/~nuffin/App-PersistentSSH-0.03/
Kick an ssh control master around on OSX using scutil
----
App-PersistentSSH-0.04
http://search.cpan.org/~nuffin/App-PersistentSSH-0.04/
Kick an ssh control master around on OSX using scutil
----
B-Generate-1.12_10
http://search.cpan.org/~rurban/B-Generate-1.12_10/
Create your own op trees.
----
Bio-Grep-0.10.5
http://search.cpan.org/~limaone/Bio-Grep-0.10.5/
Perl extension for searching in DNA and Protein sequences
----
Catalyst-Plugin-Assets-0.035
http://search.cpan.org/~rkrimen/Catalyst-Plugin-Assets-0.035/
Manage and minify .css and .js assets in a Catalyst application
----
Devel-Depend-Cpp-0.09
http://search.cpan.org/~nkh/Devel-Depend-Cpp-0.09/
Extract dependency trees from c files
----
File-Assets-0.062
http://search.cpan.org/~rkrimen/File-Assets-0.062/
Manage .css and .js assets for a web page or application
----
Geo-Sun-0.02
http://search.cpan.org/~mrdvt/Geo-Sun-0.02/
Calculates the Geodetic Position of the Sun over the Surface of the Earth
----
HTML-Template-Compiled-0.92
http://search.cpan.org/~tinita/HTML-Template-Compiled-0.92/
Template System Compiles HTML::Template files to Perl code
----
Image-Magick-Text-AutoBreak-0.01
http://search.cpan.org/~jamadam/Image-Magick-Text-AutoBreak-0.01/
Utility for auto line break
----
Image-Magick-Text-AutoBreak-0.02
http://search.cpan.org/~jamadam/Image-Magick-Text-AutoBreak-0.02/
Utility for auto line break
----
Image-Pngslimmer-0.25
http://search.cpan.org/~acmcmen/Image-Pngslimmer-0.25/
slims (dynamically created) PNGs
----
MooseX-Getopt-0.15
http://search.cpan.org/~nuffin/MooseX-Getopt-0.15/
A Moose role for processing command line options
----
Naming-Convention-0.0.1
http://search.cpan.org/~sunnavy/Naming-Convention-0.0.1/
Naming or Renaming( for identifiers, mostly )
----
Net-ARP-1.0.3
http://search.cpan.org/~crazydj/Net-ARP-1.0.3/
Perl extension for creating ARP packets
----
POE-API-Peek-1.31
http://search.cpan.org/~sungo/POE-API-Peek-1.31/
Peek into the internals of a running POE environment
----
POE-API-Peek-1.32
http://search.cpan.org/~sungo/POE-API-Peek-1.32/
Peek into the internals of a running POE environment
----
POE-Component-IRC-Plugin-BaseWrap-0.007
http://search.cpan.org/~zoffix/POE-Component-IRC-Plugin-BaseWrap-0.007/
base class for IRC plugins which need triggers/ban/root control
----
POE-Component-Jabber-2.03
http://search.cpan.org/~nperez/POE-Component-Jabber-2.03/
A POE Component for communicating over Jabber
----
Padre-0.02
http://search.cpan.org/~szabgab/Padre-0.02/
Perl Application Development and Refactoring Environment
----
PathTools-3.28_01
http://search.cpan.org/~kwilliams/PathTools-3.28_01/
----
Queue-Worker-0.01
http://search.cpan.org/~bosu/Queue-Worker-0.01/
Database based work queue abstraction.
----
RDF-Simple-Serialiser-Notation3-1.013
http://search.cpan.org/~mthurn/RDF-Simple-Serialiser-Notation3-1.013/
Output RDF triples in Notation3 format
----
Runops-Trace-0.11
http://search.cpan.org/~nuffin/Runops-Trace-0.11/
Trace your program's execution
----
Spread-Client-Constant-0.02
http://search.cpan.org/~mbailey/Spread-Client-Constant-0.02/
Spread::Client constants PM.
----
Sub-Curried-0.03
http://search.cpan.org/~osfameron/Sub-Curried-0.03/
Currying of subroutines via a new 'curry' declarator
----
Sub-Curried-0.04
http://search.cpan.org/~osfameron/Sub-Curried-0.04/
Currying of subroutines via a new 'curry' declarator
----
Tk-EntrySet-0.02
http://search.cpan.org/~lamprecht/Tk-EntrySet-0.02/
display/edit a list of values in a Set of Widgets.
----
WWW-Search-Search-1.014
http://search.cpan.org/~mthurn/WWW-Search-Search-1.014/
class for searching www.search.com
----
WordPress-API-1.08
http://search.cpan.org/~leocharre/WordPress-API-1.08/
----
XML-XPathScript-1.54
http://search.cpan.org/~yanick/XML-XPathScript-1.54/
a Perl framework for XML stylesheets
If you're an author of one of these modules, please submit a detailed
announcement to comp.lang.perl.announce, and we'll pass it along.
This message was generated by a Perl program described in my Linux
Magazine column, which can be found on-line (along with more than
200 other freely available past column articles) at
http://www.stonehenge.com/merlyn/LinuxMag/col82.html
print "Just another Perl hacker," # the original
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion
------------------------------
Date: Sat, 26 Jul 2008 20:23:44 +0800
From: zakame@zakame.net (Zak B. Elep)
Subject: Re: Perl - approach to query https website for code & parsing xml response
Message-Id: <m2vdysq1f3.fsf@zakame.net>
Reposting back to clpmisc, it'll probably help someone else. Site
changed to preserve anonymity ;)
"dc" <deepalicanada@gmail.com> writes:
> When I run above through browser, I get following XML response:
> - <BrokenResponse timestamp="25 July, 2012 01:16 PM EDT">
> <code>Invalid request</code>
> <url>https://www.brokensoapsite.example/</url>
> </BrokenResponse>
>
> But through code it gives me bad request instead of above XML response.
I realized that what you're trying to do is to POST data to what looks
like a Web Service (in particular, a SOAP/XMLRPC-like service, except it
doesn't make an envelope;) we're using the wrong tool for the job.
I suggest looking at SOAP::Lite[1]. Here's a sample session to get you
started:
,----[ perl -de 0 -MSOAP::Lite ]
|
| Loading DB routines from perl5db.pl version 1.28
| Editor support available.
|
| Enter h or `h h' for help, or `man perldebug' for more help.
|
| main::(-e:1): 0
| DB<1> $url = 'https://www.brokensoapsite.example/borked.SendRequest'
|
| DB<2> $x = SOAP::Data->name( 'x' )->value( '11223344556677889900123' )
|
| DB<3> $y = SOAP::Data->name( 'y' )->value( '999999' )
|
| DB<4> $res = SOAP::Lite->new( proxy => $url )->call( $x, $y )
|
| DB<5> x $res->dataof('//BrokenResponse)->attr->{'timestamp'}
| 0 '26 July, 2012 08:10 AM EDT'
|
| DB<6> x $res->valueof('//BrokenResponse/code')
| 0 'Invalid request'
|
| DB<7> x $res->valueof('//BrokenResponse/url')
| 0 'https://www.brokensoapsite.example/'
`----
Footnotes:
[1] http://search.cpan.org/perldoc?SOAP::Lite
--
I like the idea of 256 bits, though: 32 for the (Unicode) character leaves
room for 224 Bucky bits, which ought to be enough for anyone.
-- Roland Hutchinson, in alt.folklore.computers
------------------------------
Date: Sat, 26 Jul 2008 21:49:15 -0500
From: Nathan <user@serverrb.net>
Subject: Re: what is the expression mean?
Message-Id: <2mRik.19160$N87.1656@nlpi068.nbdc.sbc.com>
> %month2num = (nil=>'00', Jan=>'01', Feb=>'02', Mar=>'03', Apr=>'04',
> May=>'05', Jun=>'06', Jul=>'07', Aug=>'08', Sep=>'09', Oct=>'10', Nov=>'11',
> Dec=>'12');
This expression is defining a hash variable called %month2num; it
expresses the relation between a month and its number. The months are
called the "keys" and the numbers are called "values". For example,
$month2num{"Jan"} would give you the string '01'. The "=>" symbol is
used as a shorthand for this statement:
%month2num = ("nil",'00', "Jan",'01', "Feb",'02',"Mar",'03'....
>
> @num2month = sort { $month2num{$a} <=> $month2num{$b} } keys %month2num;
>
>
> how does the sort function works with keys?
The aptly named function "keys" returns a list of the keys of the hash.
In this case it would be the list of strings ("nil","Jan","Feb",....).
The function "sort" sorts a list and takes in an optional comparison
function to do the sort. After all, sorting tne month names
alphabetically is probably not what you want, right? So the statement is
saying in effect, "Retrieve the list of month names and sort them
according to number". The sorting function is being defined anonymously
with the <=> operator. You can learn about perl functions by typing
'man perl' at the command line if you use unix. You can also find
individual functions by using the perldoc program:
$ perldoc -f <funcname>
Hope this answer your question!
-Nathan
------------------------------
Date: Sat, 26 Jul 2008 05:29:00 -0700 (PDT)
From: haomiao <miaohaoz@ustc.edu>
Subject: Why stdin lose after new Thread
Message-Id: <a2923ecb-4c65-4ca7-a6df-f237da271977@a3g2000prm.googlegroups.com>
Hi
When I create a new thread, the main thread cannot get input from
<>.
The code is like
-----------------------------------------------
while ( $line = <STDIN> ) {
chomp $line;
execCmdLine($line);
print "pp> ";
}
------------------------------------------------
In the execCmdLine function, if $line eq 'conn', a new thread is
created. Then
the main thread can not get any line at all.
How can I let the main thread continue?
------------------------------
Date: Sat, 26 Jul 2008 11:40:40 -0400
From: zentara <zentara@highstream.net>
Subject: Re: Why stdin lose after new Thread
Message-Id: <kgfm8413frnmdtu0f98uo2djenpmldojkr@4ax.com>
On Sat, 26 Jul 2008 05:29:00 -0700 (PDT), haomiao <miaohaoz@ustc.edu>
wrote:
>Hi
>
> When I create a new thread, the main thread cannot get input from
><>.
>
> The code is like
>-----------------------------------------------
>while ( $line = <STDIN> ) {
> chomp $line;
> execCmdLine($line);
> print "pp> ";
>}
>------------------------------------------------
> In the execCmdLine function, if $line eq 'conn', a new thread is
>created. Then
>the main thread can not get any line at all.
>
> How can I let the main thread continue?
You don't understand how threads in Perl work very well.
When a thread gets spawned, it gets a copy of it's parent at the time.
This means when you try to dynamically spawn threads, each previous
thread gets a copy of previous ones, and memory usage of the app tends
to increase, as the memory dosn't get cleaned up completely.
It is all very complex, and you can search groups.google.com for
"perl threads", I'm not going to try an explain all the complexities
here.
Unless you really need threads for some reason, like sharing variables,
you will be better off fork-and-exec'ing stuff, as the memory cleanup
will be better.
But....
I found that if you put the readkey in a thread, you can keep
the mainloop going while receiving input. I use the Glib event
loop system here, to make things easier.
See:
http://perlmonks.org?node_id=664462
zentara
--
I'm not really a human, but I play one on earth.
http://zentara.net/Remember_How_Lucky_You_Are.html
------------------------------
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 1748
***************************************