[30475] in Perl-Users-Digest
Perl-Users Digest, Issue: 1718 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Jul 15 03:09:43 2008
Date: Tue, 15 Jul 2008 00:09:07 -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 Tue, 15 Jul 2008 Volume: 11 Number: 1718
Today's topics:
Does Perl 5.8.0 contain symbol Perl_sv_2pv? <zx.zhangxiong@gmail.com>
Re: FAQ 1.1 What is Perl? <hjp-usenet2@hjp.at>
Re: Generating fancy/pretty documents bernie@fantasyfarm.com
Re: how do prlglobs expand (was Re: 'nobody' using sudo <someone@example.com>
Re: how do prlglobs expand (was Re: 'nobody' using sudo <hansmu@xs4all.nl>
installing perl modules on windows <hsggwk@gmail.com>
Re: installing perl modules on windows <smallpond@juno.com>
Re: installing perl modules on windows <ramesh.thangamani@gmail.com>
Re: Is there any way to automate the test of an applet <spamtrap@dot-app.org>
Re: Is there any way to automate the test of an applet <ben@morrow.me.uk>
Re: Is there any way to automate the test of an applet <spamtrap@dot-app.org>
new CPAN modules on Tue Jul 15 2008 (Randal Schwartz)
Re: Odd error message on open()-ing scalar ref <1usa@llenroc.ude.invalid>
Re: reliability problem with Finance::QuoteHist::Yahoo <smallpond@juno.com>
Re: reliability problem with Finance::QuoteHist::Yahoo <allergic-to-spam@no-spam-allowed.invalid>
Re: unix guy needs win32 API help <nospam@somewhere.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 14 Jul 2008 19:52:30 -0700 (PDT)
From: DirtyBear <zx.zhangxiong@gmail.com>
Subject: Does Perl 5.8.0 contain symbol Perl_sv_2pv?
Message-Id: <5ced5fcd-696d-426c-98b2-b648a7be69dd@w7g2000hsa.googlegroups.com>
Hi friends,
Perl 5.8.0 seems a bit strange. I encounterred a trouble in my dynamic
library which uses this symbol of Perl:
ld.so.1: perl: fatal: relocation error: file /opt/mylib/libAPIPerl.so:
symbol Perl_sv_2pv: referenced symbol not found
Killed
Solaris 9/10
Perl was built from source code tar ball.
zcyds4d6-85> perl -v
This is perl, v5.8.0 built for sun4-solaris-64int
zcyds4d6-89> nm /bin/perl | grep -i Perl_sv_2pv
[2590] | 597800| 2980|FUNC |GLOB |0 |11 |
Perl_sv_2pv_flags
[2234] | 597504| 28|FUNC |GLOB |0 |11 |
Perl_sv_2pv_nolen
[2106] | 601164| 76|FUNC |GLOB |0 |11 |Perl_sv_2pvbyte
[921] | 601140| 24|FUNC |GLOB |0 |11 |
Perl_sv_2pvbyte_nolen
[1338] | 601264| 76|FUNC |GLOB |0 |11 |Perl_sv_2pvutf8
[1487] | 601240| 24|FUNC |GLOB |0 |11 |
Perl_sv_2pvutf8_nolen
But from perl5.6.1 to perl 5.8.8, I can find the reference in every
release except 5.8.0.
Perl5.8.4 sample:
nm /usr/local/bin/perl | grep -i Perl_sv_2pv
[1926] | 596152| 28|FUNC |GLOB |0 |9 |Perl_sv_2pv
[1540] | 596180| 2872|FUNC |GLOB |0 |9 |
Perl_sv_2pv_flags
[1677] | 595996| 28|FUNC |GLOB |0 |9 |
Perl_sv_2pv_nolen
[2571] | 599204| 132|FUNC |GLOB |0 |9 |Perl_sv_2pvbyte
[2454] | 599180| 24|FUNC |GLOB |0 |9 |
Perl_sv_2pvbyte_nolen
[2084] | 599360| 132|FUNC |GLOB |0 |9 |Perl_sv_2pvutf8
[2450] | 599336| 24|FUNC |GLOB |0 |9 |
Perl_sv_2pvutf8_nolen
The Perl 5.8.0 delta ( http://search.cpan.org/dist/perl/pod/perl58delta.pod#Perl_get_sv
) said that it that is no more the case. what does it mean?
Perl_get_sv
You may get errors like 'Undefined symbol "Perl_get_sv"' or "can't
resolve symbol 'Perl_get_sv'", or the symbol may be "Perl_sv_2pv".
This probably means that you are trying to use an older shared Perl
library (or extensions linked with such) with Perl 5.8.0 executable.
Perl used to have such a subroutine, but that is no more the case.
Check your shared library path, and any shared Perl libraries in those
directories.
Sometimes this problem may also indicate a partial Perl 5.8.0
installation, see "Mac OS X dyld undefined symbols"
I also found a link about this issue, but it did not say whether this
symbol was kept in Perl 5.8.0.
http://www.gossamer-threads.com/lists/engine?do=post_view_printable;post=6902;list=modperl
Why is Perl 5.8.0 so strange? How to resolve this problem?
Thanks in advance.
------------------------------
Date: Tue, 15 Jul 2008 08:04:58 +0200
From: "Peter J. Holzer" <hjp-usenet2@hjp.at>
Subject: Re: FAQ 1.1 What is Perl?
Message-Id: <slrng7ofgc.9pb.hjp-usenet2@hrunkner.hjp.at>
On 2008-07-13 20:53, Keith Keller <kkeller-usenet@wombat.san-francisco.ca.us> wrote:
> On 2008-07-13, szr <szrRE@szromanMO.comVE> wrote:
>> There are also some news readers that (incorrectly) will group messages
>> with the name subject, instead of checking for references.
In good readers this is configurable. If the user has explicitely
configured it, it isn't incorrect.
>> The easy fix is add something variable to the subject to make it
>> different each time that FAQ is posted, like, for example,
>>
>> FAQ 123: Short Description of FAQ %
>> FAQ 123: Short Description of FAQ ^
>> FAQ 123: Short Description of FAQ $
>>
>> Or some other way of making it unique.
>
>
> It seems like putting a posting date would help make it unique, if that
> were actually desired. (I don't see a real need.)
I don't think it's very useful to distinguish otherwise identical
postings in the subject. It might be useful to include the date when an
FAQ entry was *last changed* in the subject:
* FAQ entries which have been recently changed can be easily identified
* FAQ entries which are very old (and hence likely to be out-of-date)
can be easily identified
* a use could killfile each entry after reading it (perhaps for a
limited time) and still get the new version if the entry is updated.
(although given the number of different FAQ entries I doubt anyone
would do this).
hp
------------------------------
Date: Mon, 14 Jul 2008 11:26:11 -0700 (PDT)
From: bernie@fantasyfarm.com
Subject: Re: Generating fancy/pretty documents
Message-Id: <5105b9f7-c1fb-44cf-8352-4dd16f1ed0ad@k37g2000hsf.googlegroups.com>
On Jul 9, 7:52=A0am, "Dr.Ruud" <rvtol+n...@isolution.nl> wrote:
> Bernie Cosell schreef:
>
> > Suggestions on how to produce "nice" text documents from Perl? =A0Plain
> > text is easy, of course, but I need to be able to do
> > fancier/formatted stuff. What I've done in the past is generate HTML
> > [with <tables>, <fonts>, etc] and then use an app like HTMLDOC to
> > convert that to PDF (and, indeed, a long time back I used to generate
> > troff input and use ghostscript to process *that*). ...
> Maybe you are looking for XML::ApacheFOP.
*Great* suggestion. I've had a chance to look at this now and it
looks like a very effective way to proceed. XML::ApacheFOP actually
automates it more than I think I would need to. For those of you who
aren't familiar with this, there is an XML spec for document
formatting, called "XSL-FO". All of the [easy :o)] schemes to do the
type of document creation I had been thinkingof involve an
intermediate "markup" format for your document: HTML [for HTMLDOC]
LaTeX [for [La]Tex/dvi], even troff [for -ms and n/troff]. This is a
similar approach, but using an XML spec'ed format. It looks to be
fairly fancy [some of the online examples I've seen of what you can do
with XSL-FO are pretty slick]. Also, since it is XML you can
*GENERATE* it from other sources [cf XSLT].
The neat part is that compared to LaTeX the backend is comparatively
simple: Apache.org has written an XSL-FO =3Dto=3D nearlyanything
processing program writting in Java [the processor is called "FOP" and
the module referenced above basically automates spawning the JRE and
feeding FOP to it for you].
The XSL-FO spec is a bit complicated, but it doesn't seem all that bad
after you've tried wrestling with the LaTeX book [and don't even
*think* about trying to plow through the TeX book..:o)], so I'm going
to give it a try. THANKS!!
/Bernie\
------------------------------
Date: Mon, 14 Jul 2008 17:47:03 GMT
From: "John W. Krahn" <someone@example.com>
Subject: Re: how do prlglobs expand (was Re: 'nobody' using sudo -- scary!)
Message-Id: <riMek.1046$nD.699@pd7urf1no>
Ben Morrow wrote:
> Quoth xhoster@gmail.com:
>> Ben Morrow <ben@morrow.me.uk> wrote:
>>> Quoth "John W. Krahn" <jwkrahn@shaw.ca>:
>>>> Joe Smith wrote:
>>>>> Hans Mulder wrote:
>>>>>
>>>>>> If you really don't want to have the whole list in memory, you'll
>>>>>> have to roll your own glob using readdir. Something like:
>>>>>>
>>>>>> opendir HOMES, "/home" or die Can't read /home: $!";
>>>>>> while (my $entry = readdir(HOMES)) {
>>>>> The first call to readdir() in scalar context will read the entire
>>>>> list into memory
>>>> No it won't.
>>> (deja vu anyone?) Yes it will.
>> No it won't.
>>
>> We have now switched from glob to readdir. Different functions,
>> different behaviors. (I missed that transition myself at first.)
>
> D'oh! Yes, of course; sorry, John.
That's OK, I wanted an argument, not just the automatic gainsaying of
anything the other person says. :-)
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: Mon, 14 Jul 2008 23:52:20 +0200
From: Hans Mulder <hansmu@xs4all.nl>
Subject: Re: how do prlglobs expand (was Re: 'nobody' using sudo -- scary!)
Message-Id: <487bcaca$0$14356$e4fe514c@news.xs4all.nl>
Joe Smith wrote:
> Hans Mulder wrote:
>> If you really don't want to have the whole list in memory, you'll
>> have to roll your own glob using readdir. Something like:
>> opendir HOMES, "/home" or die Can't read /home: $!";
>> while (my $entry = readdir(HOMES)) {
> The first call to readdir() in scalar context will read the entire list
> into memory and return just the first one. Succeeding calls to
> readdir() in scalar context will return the next one from the buffer.
> Either way, you'll still end up having the whole list in memory.
That will only happen if the directory if fairly small. Readdir uses a
fixed-size buffer (typically 8kB). On the first call in scalar context,
it reads a bunch of entries into the buffer and returns the filename
from the first entry. On subsequent calls, it returns filenames from
the other entries in the buffer, until the buffer is exhausted, then
it reads the second bunch of entries into the buffer, etc.
Hope this helps,
-- HansM
------------------------------
Date: Mon, 14 Jul 2008 21:22:21 -0700 (PDT)
From: gsa <hsggwk@gmail.com>
Subject: installing perl modules on windows
Message-Id: <a1f367cc-b0e0-4b4d-b8d8-29731b5d917c@x35g2000hsb.googlegroups.com>
Hi all,
I am having to install the CGI module on a Windows XP machine
and it is very frustrating. I read that I should use the PPM to
install it, but the CGI module doesn't show up on the list of packages
that PPM can install. So I tried installing manually by downloading
the module and installing using nmake, dname, make.. none of which
work. I get a message saying "nmake" is not a recognized command. I
have installed perl modules on MACs a number of times and CPAN.pm
works like a dream. This is very frustrating and I would appreciate
any help in this regard. Thanks in advance for all your help.
------------------------------
Date: Mon, 14 Jul 2008 21:41:10 -0700 (PDT)
From: smallpond <smallpond@juno.com>
Subject: Re: installing perl modules on windows
Message-Id: <b83eff8b-8b01-4c38-8836-cae79b839aa4@i76g2000hsf.googlegroups.com>
On Jul 15, 12:22 am, gsa <hsg...@gmail.com> wrote:
> Hi all,
> I am having to install the CGI module on a Windows XP machine
> and it is very frustrating. I read that I should use the PPM to
> install it, but the CGI module doesn't show up on the list of packages
> that PPM can install. So I tried installing manually by downloading
> the module and installing using nmake, dname, make.. none of which
> work. I get a message saying "nmake" is not a recognized command. I
> have installed perl modules on MACs a number of times and CPAN.pm
> works like a dream. This is very frustrating and I would appreciate
> any help in this regard. Thanks in advance for all your help.
CGI is a core module. What perl distribution are you using?
Did you check whether CGI is already present?
--S
------------------------------
Date: Mon, 14 Jul 2008 23:44:27 -0700 (PDT)
From: rthangam <ramesh.thangamani@gmail.com>
Subject: Re: installing perl modules on windows
Message-Id: <3c901410-c5fc-4849-bb7e-5d6e03b690db@m3g2000hsc.googlegroups.com>
On Jul 15, 9:41 am, smallpond <smallp...@juno.com> wrote:
> On Jul 15, 12:22 am, gsa <hsg...@gmail.com> wrote:
>
> > Hi all,
> > I am having to install the CGI module on a Windows XP machine
> > and it is very frustrating. I read that I should use the PPM to
> > install it, but the CGI module doesn't show up on the list of packages
> > that PPM can install. So I tried installing manually by downloading
> > the module and installing using nmake, dname, make.. none of which
> > work. I get a message saying "nmake" is not a recognized command. I
> > have installed perl modules on MACs a number of times and CPAN.pm
> > works like a dream. This is very frustrating and I would appreciate
> > any help in this regard. Thanks in advance for all your help.
>
> CGI is a core module. What perl distribution are you using?
> Did you check whether CGI is already present?
>
> --S
You need to have visual studio installed to use nmake. nmake comes as
a part of
Microsoft VC++. Are you using Active perl ?. I have done some
installation like DBI,DBD::Oracle etc on my Windows XP machine. It
went fine.
------------------------------
Date: Mon, 14 Jul 2008 11:50:23 -0400
From: Sherman Pendley <spamtrap@dot-app.org>
Subject: Re: Is there any way to automate the test of an applet using perl?
Message-Id: <m14p6sjwhs.fsf@dot-app.org>
"lofenee" <lofenee@gmail.com> writes:
> Can I?
There's no way that I know of. Testing an applet would mean being able
to load a JVM, run the applet, and call its methods. Neither of the
web client modules I'm aware of (LWP and WWW::Mechanize) can do that.
There's a JVM module, if "offline" testing of your applet without its
surrounding HTML context is sufficient:
<http://search.cpan.org/~alknaff/Jvm-0.9.3/Jvm.pm>
I really wonder though, what's the point of using Perl to test Java?
There are plenty of native Java unit-testing tools, so why not simply
use one of those? I like Perl as much as the next guy (or gal), but
jumping through hoops to use it instead of a much easier solution in
another language is just plain silly.
sherm--
--
My blog: http://shermspace.blogspot.com
Cocoa programming in Perl: http://camelbones.sourceforge.net
------------------------------
Date: Mon, 14 Jul 2008 17:27:19 +0100
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: Is there any way to automate the test of an applet using perl?
Message-Id: <7cbsk5-r9g.ln1@osiris.mauzo.dyndns.org>
[please include your question in the body of your post as well as the
Subject. Some of us don't read Subjects.]
Quoth "lofenee" <lofenee@gmail.com>:
> Can I?
[test a java(?) applet using Perl]
You may be able to do this with WWW::Selenium, although as Sherm said
it's probably better not to.
Ben
--
The cosmos, at best, is like a rubbish heap scattered at random.
Heraclitus
ben@morrow.me.uk
------------------------------
Date: Mon, 14 Jul 2008 21:51:33 -0400
From: Sherman Pendley <spamtrap@dot-app.org>
Subject: Re: Is there any way to automate the test of an applet using perl?
Message-Id: <m1tzer3oey.fsf@dot-app.org>
"lofenee" <lofenee@gmail.com> writes:
> As i have little knowledge of Java. If appropriatly here, can you
> give me some instruction about auto-testing of an java applet other
> than perl?
JUnit is very popular, and integrated in a number of IDEs, such as
Eclipse and NetBeans:
<http://junit.sourceforge.net/>
JUnit is so popular that it's spawned an entire family of unit testing
tools, including one for Perl called Test::Unit:
<http://search.cpan.org/~mcast/Test-Unit-0.25/lib/Test/Unit.pm>
sherm--
--
My blog: http://shermspace.blogspot.com
Cocoa programming in Perl: http://camelbones.sourceforge.net
------------------------------
Date: Tue, 15 Jul 2008 04:42:20 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Tue Jul 15 2008
Message-Id: <K416EK.5n@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.
Acme-CPANAuthors-0.04
http://search.cpan.org/~ishigaki/Acme-CPANAuthors-0.04/
We are CPAN authors
----
Algorithm-TravelingSalesman-BitonicTour-0.04
http://search.cpan.org/~jtrammell/Algorithm-TravelingSalesman-BitonicTour-0.04/
solve the euclidean traveling-salesman problem with bitonic tours
----
B-Debug-1.11
http://search.cpan.org/~rurban/B-Debug-1.11/
Walk Perl syntax tree, printing debug info about ops
----
BSD-arc4random-1.21
http://search.cpan.org/~sjsz/BSD-arc4random-1.21/
Perl interface to the arc4 random number generator
----
Bundle-libwin32-0.30
http://search.cpan.org/~jdb/Bundle-libwin32-0.30/
install all modules that make up the libwin32 bundle
----
Cache-CacheFactory-1.06_01
http://search.cpan.org/~sgraham/Cache-CacheFactory-1.06_01/
factory class for Cache::Cache and other modules.
----
Cache-CacheFactory-1.06_02
http://search.cpan.org/~sgraham/Cache-CacheFactory-1.06_02/
factory class for Cache::Cache and other modules.
----
Catalyst-Action-Wizard-0.004
http://search.cpan.org/~davinchi/Catalyst-Action-Wizard-0.004/
actions like realization of wizards. You need this if you have some multi-actions data gathering which unlikely to be saved in session and to big to pass them as POST or GET parameters.
----
CatalystX-Imports-0.02
http://search.cpan.org/~flora/CatalystX-Imports-0.02/
Shortcut functions for Catalyst controllers
----
Class-LazyObject-0.10_1
http://search.cpan.org/~daxelrod/Class-LazyObject-0.10_1/
Deferred object construction
----
Config-YUM-1.9
http://search.cpan.org/~opitz/Config-YUM-1.9/
Perl extension for parsing yum.conf
----
DBIx-MyParseX-0.05
http://search.cpan.org/~ctbrown/DBIx-MyParseX-0.05/
Extensions to DBIx::MyParse
----
DBIx-TableReferences-MSSQL-0.04
http://search.cpan.org/~edwardg/DBIx-TableReferences-MSSQL-0.04/
Perl extension for getting information about declared referential constraints in MS SQL Server 2000 databases.
----
Data-FeatureFactory-0.04.04
http://search.cpan.org/~sixtease/Data-FeatureFactory-0.04.04/
evaluate features normally or numerically
----
Data-Valve-0.00004
http://search.cpan.org/~dmaki/Data-Valve-0.00004/
Throttle Your Data
----
Data-Valve-0.00005
http://search.cpan.org/~dmaki/Data-Valve-0.00005/
Throttle Your Data
----
Egg-Release-DBIC-0.05
http://search.cpan.org/~lushe/Egg-Release-DBIC-0.05/
Package kit to use DBIx::Class.
----
Exporter-Renaming-1.18
http://search.cpan.org/~anno/Exporter-Renaming-1.18/
Allow renaming of symbols on import
----
File-Find-Iterator-0.4
http://search.cpan.org/~texmec/File-Find-Iterator-0.4/
----
IPC-Cmd-0.41_04
http://search.cpan.org/~kane/IPC-Cmd-0.41_04/
finding and running system commands made easy
----
InSilicoSpectro-1.3.21
http://search.cpan.org/~alexmass/InSilicoSpectro-1.3.21/
Open source Perl library for proteomics
----
KeyedMutex-0.06
http://search.cpan.org/~kazuho/KeyedMutex-0.06/
An interprocess keyed mutex
----
Mail-Sender-0.8.16
http://search.cpan.org/~jenda/Mail-Sender-0.8.16/
module for sending mails with attachments through an SMTP server
----
Math-Expression-Evaluator-0.1.2
http://search.cpan.org/~moritz/Math-Expression-Evaluator-0.1.2/
parses, compiles and evaluates mathematic expressions
----
Module-Install-CustomInstallationPath-0.1040
http://search.cpan.org/~dcoppit/Module-Install-CustomInstallationPath-0.1040/
A Module::Install extension that allows the user to interactively specify custom installation directories
----
MooseX-Log-Log4perl-0.2.1
http://search.cpan.org/~lammel/MooseX-Log-Log4perl-0.2.1/
A Logging Role for Moose based on Log::Log4perl
----
MooseX-Log-Log4perl-0.3.0
http://search.cpan.org/~lammel/MooseX-Log-Log4perl-0.3.0/
A Logging Role for Moose based on Log::Log4perl
----
MooseX-Log-Log4perl-0.30
http://search.cpan.org/~lammel/MooseX-Log-Log4perl-0.30/
A Logging Role for Moose based on Log::Log4perl
----
Mvalve-0.00007
http://search.cpan.org/~dmaki/Mvalve-0.00007/
Generic Q4M Powered Message Pipe
----
Mvalve-0.00008
http://search.cpan.org/~dmaki/Mvalve-0.00008/
Generic Q4M Powered Message Pipe
----
MySQL-Slurp-0.15
http://search.cpan.org/~ctbrown/MySQL-Slurp-0.15/
Use PIPEs to import a file into MySQL table.
----
Net-SIP-0.46
http://search.cpan.org/~sullr/Net-SIP-0.46/
Framework SIP (Voice Over IP, RFC3261)
----
OpenResty-0.3.14
http://search.cpan.org/~agent/OpenResty-0.3.14/
General-purpose web service platform for web applications
----
POE-Component-Server-SimpleXMLRPC-0.01_1
http://search.cpan.org/~catone/POE-Component-Server-SimpleXMLRPC-0.01_1/
----
Path-Router-0.02
http://search.cpan.org/~stevan/Path-Router-0.02/
A tool for routing paths
----
PerlIO-Util-0.53
http://search.cpan.org/~gfuji/PerlIO-Util-0.53/
A selection of general PerlIO utilities
----
RDF-Trine-0.108
http://search.cpan.org/~gwilliams/RDF-Trine-0.108/
An RDF Framework for Perl.
----
Sjis-0.20
http://search.cpan.org/~ina/Sjis-0.20/
Source code filter for ShiftJIS script
----
Syntax-Highlight-Engine-Simple-0.04
http://search.cpan.org/~jamadam/Syntax-Highlight-Engine-Simple-0.04/
Simple Syntax Highlight Engine
----
Tk-HyperText-0.06
http://search.cpan.org/~kirsle/Tk-HyperText-0.06/
An ROText widget which renders HTML code.
----
WWW-Search-2.502
http://search.cpan.org/~mthurn/WWW-Search-2.502/
Virtual base class for WWW searches
----
WWW-Search-AltaVista-2.152
http://search.cpan.org/~mthurn/WWW-Search-AltaVista-2.152/
class for searching www.altavista.com
----
XML-Entities-0.03-01
http://search.cpan.org/~sixtease/XML-Entities-0.03-01/
Decode strings with XML entities
----
XML-Entities-0.03_01
http://search.cpan.org/~sixtease/XML-Entities-0.03_01/
Decode strings with XML entities
----
stockmonkey-2.11
http://search.cpan.org/~jettero/stockmonkey-2.11/
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: Mon, 14 Jul 2008 18:21:31 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Odd error message on open()-ing scalar ref
Message-Id: <Xns9ADB9210330A8asu1cornelledu@127.0.0.1>
Leon Timmermans <fawaka@gmail.com> wrote in news:pan.2008.07.13.23.19.47
@gmail.com:
> On Sun, 13 Jul 2008 22:51:10 +0200, Hartmut Camphausen wrote:
>
>> Hi all,
>>
>> Consider this snippet:
>>
>> open ($fh, '<', $fref) || die $!
>> warn "(1) $!" if $!;
>>
>
> You have a syntax error here, you forgot the semicolon after $!.
That might have been more obvious had the OP not decided to format Perl
as if it is assembly language.
I realize beauty is in the eye of the beholder but I would urge the OP
to read
perldoc perlstyle
to ensure that his code is accessible to as many people as possible
(especially when requesting help in a public forum).
> Please post correct code on the newsgroup ;-)
That would help.
Sinan
--
A. Sinan Unur <1usa@llenroc.ude.invalid>
(remove .invalid and reverse each component for email address)
comp.lang.perl.misc guidelines on the WWW:
http://www.rehabitation.com/clpmisc/
------------------------------
Date: Mon, 14 Jul 2008 17:46:15 -0400
From: smallpond <smallpond@juno.com>
Subject: Re: reliability problem with Finance::QuoteHist::Yahoo
Message-Id: <cf518$487bc939$19723@news.teranews.com>
Ted wrote:
> I have been able to get this package to work sometimes. However,
> invariably it fails on me part way through my script, after
> downloading data for from one to four ticker symbols. The error is:
>
> Can't use an undefined value as an ARRAY reference at C:/Perl/site/lib/
> Finance/QuoteHist/Generic.pm line 863.
>
> I have no information about how an undefined value is being passed
> deep into the code of a package I didn't write. I took a quick look
> into Generic.pm and yahoo.pm, but found no enlightenment so far
> (there's a lot of code there).
>
> Sometimes it arises when quotes() is executed, and at other times, it
> occurs when dividends() is executed.
>
> The script I am using is appended below. There isn't anything special
> about it. Much of it I copied from example code in the documentation
> provided for the two finance packages I'm trying. About all I did was
> merge two example scripts, and attempt to get the historical quote
> data for one symbol at a time. So far, I have historical quote data
> for four stocks. There are over 7000 that I need to retrieve:
> obviously not something that is manageable manually downloading each
> individually.
>
> Neither Finance::QuoteHist::Generic nor Finance::QuoteHist::Yahoo
> (which is derived from the former) say anything about error handling,
> or provide a way to test whether or not data was successfully
> downloaded.
>
> Any assistance would be greatly appreciated.
>
> Thanks
>
> Ted
>
Without even looking at your code my guess is that Yahoo! is not particularly
pleased about providing an ad-sponsored service to web-scrapers. Part of the
reason that free services change their page format is to block people from
doing this. Yahoo! changes their page format fairly frequently and I'm willing
to bet that their web programmers have access to CPAN. If you need 7000 quotes
then its pretty clearly not for your personal portfolio. Maybe time for your
company to invest in a quote service.
--S
** Posted from http://www.teranews.com **
------------------------------
Date: Tue, 15 Jul 2008 00:23:20 +0200 (CEST)
From: Jim Cochrane <allergic-to-spam@no-spam-allowed.invalid>
Subject: Re: reliability problem with Finance::QuoteHist::Yahoo
Message-Id: <slrng7nkdg.f9v.allergic-to-spam@no-spam-allowed.invalid>
On 2008-07-14, smallpond <smallpond@juno.com> wrote:
> Ted wrote:
>> I have been able to get this package to work sometimes. However,
>> invariably it fails on me part way through my script, after
>> downloading data for from one to four ticker symbols. The error is:
>>
>> Can't use an undefined value as an ARRAY reference at C:/Perl/site/lib/
>> Finance/QuoteHist/Generic.pm line 863.
>>
>> I have no information about how an undefined value is being passed
>> deep into the code of a package I didn't write. I took a quick look
>> into Generic.pm and yahoo.pm, but found no enlightenment so far
>> (there's a lot of code there).
>>
>> Sometimes it arises when quotes() is executed, and at other times, it
>> occurs when dividends() is executed.
>> ...
>
> Without even looking at your code my guess is that Yahoo! is not particularly
> pleased about providing an ad-sponsored service to web-scrapers. Part of the
> reason that free services change their page format is to block people from
> doing this. Yahoo! changes their page format fairly frequently and I'm willing
> to bet that their web programmers have access to CPAN. If you need 7000 quotes
> then its pretty clearly not for your personal portfolio. Maybe time for your
> company to invest in a quote service.
If you have good software, configured to do intensive filtering, data
for 7000 tradables can be easily managable for an individual trader.
On the other hand, if an individual trader needs a reliable and accurate
data feed for automated analysis, a free yahoo service is probably a
poor choice.
It sounds like the package in question is not as robust as it could be,
allowing the user to encounter a run-time undefined value error instead
of producing a good error message. However, yahoo changing the server's
behavior or data format seems a likely initial cause of the problem.
--
------------------------------
Date: Mon, 14 Jul 2008 20:23:54 -0400
From: "Thrill5" <nospam@somewhere.com>
Subject: Re: unix guy needs win32 API help
Message-Id: <XtadnWzqf9yGc-bVnZ2dnUVZ_u-dnZ2d@comcast.com>
"ivowel" <ivowel@gmail.com> wrote in message
news:ed9f55ec-c49d-4b18-a8af-14f75acc044f@i76g2000hsf.googlegroups.com...
> On Jul 8, 8:24 am, Ben Morrow <b...@morrow.me.uk> wrote:
>> Quoth Ben Bullock <benkasminbull...@gmail.com>:
>>
>>
>>
>> > On Mon, 07 Jul 2008 18:55:16 -0700,ivowelwrote:
>>
>> > > * in the file explorer, right-click on a file [whose name my perl
>> > > program provides] and select a particular program to invoke on this
>> > > file. For example, this could be "Send To -> Compressed (zipped)
>> > > Folder" or "Send to Mail Recipient". In my specific case, I want to
>> > > right-click a file to "Abby Finereader -> Convert into ..." or
>> > > "OmniPage 16 -> Convert to PDF". Fortunately, there is nothing else
>> > > that these invoked programs require as subsequent input.
>>
>> > > Then I want to wait until the invoked program is completed and
>> > > exits. This is it.
>>
>> > As Martijn Lievaart mentioned, this isn't a Perl problem. Altering the
>> > behaviour of the right-click menu in "Explorer" is to do with the
>> > Windows
>> > registry.
>>
>> I believe (but ICBW) that this is not what the OP is asking. I think he
>> is trying to *invoke* an existing right-click option on a given file.
>> For ordinary options (those in the first section of the menu, and those
>> in Send To) this is easy: just incoke the appropriate command with the
>> appropriate options. For those provided by dlls, this is much harder,
>> and I'm afraid I don't know of any easy way to do it. I would advise
>> checking the documentation of your OCR programs to be sure they don't
>> provide some sort of command-line interface.
>>
>> Ben
>>
>> --
>> All persons, living or dead, are entirely coincidental.
>> b...@morrow.me.uk Kurt
>> Vonnegut
>
>
> Exactly. I really want to write a sub in Perl that does exactly the
> same as right-clicking by hand would achieve. Yes, these menu options
> are provided by programs. (I used "Send to" as an illustration,
> because everyone has seen what it is.)
>
> In some sense, all that I need is something like
>
> my $process = $somefilename->rightclick("OmniPage 16", "Convert to
> Pdf"); # do the same thing as a hand-rightclick first on OmniPage16
> and then its submenu Convert to pdf"
> wait($process); # wait until it completes
>
> That's it. Does anyone know?
>
> /iaw
You don't need to emulate a right-click at all. All Explorer does is
execute a program or calls a DLL in the fashion specified by file extension.
Finding out how to execute the program can be easy or difficult, depending
on how it is called You can look at the file association used by windows
(In Explorer, click Tools->Folder Options->File Types. Find the select the
extension, then click the "Advanced" button. A list of "Actions" will be
displayed, select the action, and click "Edit". This will then show the
application that is executed. "%1" is the name of the selected file.
Sometimes its not this easy to figure out how windows does this, but since
no other input is required from the user when selecting the right-click menu
item, this will probably tell you which program is being executed.
Also check out the "C:\Documents and Settings\{loginname}\SendTo" directory.
This will list the "SendTo" items on the right-click menu. These will
either be a ".LNK" type or a zero byte file. If it is a link, you can see
the program associated with it by selecting it and clicking "Properties".
If it is a zero byte file, it will have a "dot" in it and the everything
after the dot is the file association. To find out how this works you will
need to some digging in the registry to figure out what program or DLL is
associated with that extension.
------------------------------
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 1718
***************************************