[28805] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 49 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Jan 19 03:05:49 2007

Date: Fri, 19 Jan 2007 00:05:06 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Fri, 19 Jan 2007     Volume: 11 Number: 49

Today's topics:
    Re: Can't get output from pipe with autoflush on xhoster@gmail.com
    Re: convert Vbscript to Perl code <nuke@all.spam>
    Re: convert Vbscript to Perl code <uri@stemsystems.com>
    Re: convert Vbscript to Perl code <john@castleamber.com>
    Re: convert Vbscript to Perl code <nuke@allspam.invalid>
    Re: convert Vbscript to Perl code <john@castleamber.com>
    Re: I/O open() <mmccaws@comcast.net>
    Re: I/O open() <spamtrap@dot-app.org>
    Re: I/O open() axel@white-eagle.invalid.uk
    Re: I/O open() <mmccaws@comcast.net>
    Re: I/O open() <mmccaws@comcast.net>
    Re: Indirect function call via Name <ro.naldfi.scher@gmail.com>
    Re: Map Windows from Unix <m@remove.this.part.rtij.nl>
        new CPAN modules on Fri Jan 19 2007 (Randal Schwartz)
    Re: parse body mime message jcharth@hotmail.com
    Re: parse body mime message <spamtrap@dot-app.org>
        SOAP::Lite & Web Services not ready for prime time? <stevel@bluetuna.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: 19 Jan 2007 03:24:05 GMT
From: xhoster@gmail.com
Subject: Re: Can't get output from pipe with autoflush on
Message-Id: <20070118222509.067$eN@newsreader.com>

"Ishmael" <stahl.karl@gmail.com> wrote:
> Howdy,
>
> I'm trying to get a list of clients/users on my network using 'rusers'.
>  When I run 'rusers' from the command line, the behavior is as follows:
>  First, it instantaneously prints list of clients/users (perfect) THEN
> it hangs for several seconds (I think this is due to a problem with the
> client database configuration, over which I have no control).  In any
> case, I would like to time out the function after a second or so, keep
> the first chunk of output, and kill the 'rusers' function.
> Unfortunately, it seems as if the output does not become accessible via
> the filehandle (see below) unless 'rusers' exits normally (which takes
> too long).  I've tried turning 'autoflush' on, but this doesn't seem to
> work.

You need to get rusers to turn on *its* autoflush.  If you trick it into
thinking it is talking to a terminal rather than program, it might do so.
I think the Expect module can arrange this trickery for you.

Xho

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


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

Date: Fri, 19 Jan 2007 03:48:22 GMT
From: "tony.p" <nuke@all.spam>
Subject: Re: convert Vbscript to Perl code
Message-Id: <acXrh.2493$O02.2078@newssvr11.news.prodigy.net>

Uri Guttman wrote:
>
> anonymity is another way to make yourself ignored. cowards have no
> rights to attack others.

If you refer to the fact I choose not to display my email address, then 
that is anyone's rught. With email harvesters and the likes, it should 
not be surprising. If you wish to email me, just ask and I'll post 
munged version of my email.

I do, however, use my real name, so I'm not truly anonymous.

> this is not a court of law or where you need
> to be in the witless (sic) protection program. and the rule of not
> helping with perl also stands. have you helped an old lady with her 
> perl
> today?

A rule you made up, and you are judging people on based on your own 
ignorance. No one owns a group. Get over it.

It's clear to me you'll use any rational to form your arguments rather 
then actually answering the original question about the posting conduct 
of another poster. Questions of that type have always been allowed, 
regardless of subject. 




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

Date: Thu, 18 Jan 2007 23:13:54 -0500
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: convert Vbscript to Perl code
Message-Id: <x7lkjzhcvx.fsf@mail.sysarch.com>

>>>>> "tp" == tony p <nuke@all.spam> writes:

  tp> Uri Guttman wrote:
  >> 
  >> anonymity is another way to make yourself ignored. cowards have no
  >> rights to attack others.

  tp> If you refer to the fact I choose not to display my email address, then 
  tp> that is anyone's rught. With email harvesters and the likes, it should 
  tp> not be surprising. If you wish to email me, just ask and I'll post 
  tp> munged version of my email.

  tp> I do, however, use my real name, so I'm not truly anonymous.

  >> this is not a court of law or where you need
  >> to be in the witless (sic) protection program. and the rule of not
  >> helping with perl also stands. have you helped an old lady with her 
  >> perl
  >> today?

  tp> A rule you made up, and you are judging people on based on your own 
  tp> ignorance. No one owns a group. Get over it.

  tp> It's clear to me you'll use any rational to form your arguments rather 
  tp> then actually answering the original question about the posting conduct 
  tp> of another poster. Questions of that type have always been allowed, 
  tp> regardless of subject. 

HALAGAGALAGAGALALAGAGAGAGAALLLAA

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: 19 Jan 2007 04:52:01 GMT
From: John Bokma <john@castleamber.com>
Subject: Re: convert Vbscript to Perl code
Message-Id: <Xns98BCE89CF379Dcastleamber@130.133.1.4>

"tony.p" <nuke@all.spam> wrote:

> If you refer to the fact I choose not to display my email address, then 
> that is anyone's rught.

Yes, but don't pick a tld you made up, even if it doesn't exist. So better 
is: nuke@allspam.invalid (if you prefer to have the allspam there).


-- 
John                Experienced Perl programmer: http://castleamber.com/

          Perl help, tutorials, and examples: http://johnbokma.com/perl/


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

Date: Fri, 19 Jan 2007 05:05:52 GMT
From: "tony.p" <nuke@allspam.invalid>
Subject: Re: convert Vbscript to Perl code
Message-Id: <QkYrh.21408$yC5.12064@newssvr27.news.prodigy.net>

John Bokma wrote:
> "tony.p" <nuke@all.spam> wrote:
>
> > If you refer to the fact I choose not to display my email address,
> > then that is anyone's rught.
>
> Yes, but don't pick a tld you made up, even if it doesn't exist. So
> better is: nuke@allspam.invalid (if you prefer to have the allspam
> there).

Point taken, and thank you. 




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

Date: 19 Jan 2007 05:48:19 GMT
From: John Bokma <john@castleamber.com>
Subject: Re: convert Vbscript to Perl code
Message-Id: <Xns98BCF2286A67Bcastleamber@130.133.1.4>

"tony.p" <nuke@allspam.invalid> wrote:
 
> Point taken, and thank you. 

Thanks tony

-- 
John                Experienced Perl programmer: http://castleamber.com/

          Perl help, tutorials, and examples: http://johnbokma.com/perl/


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

Date: 18 Jan 2007 20:28:26 -0800
From: "mmccaws2" <mmccaws@comcast.net>
Subject: Re: I/O open()
Message-Id: <1169180906.532794.204810@51g2000cwl.googlegroups.com>


mmccaws2 wrote:
> Sherm Pendley wrote:
> > "mmccaws2" <mmccaws@comcast.net> writes:
> >
> > > I'm trying to understand the I/O open function better.
> >
> > Have you read "perldoc perlopentut"?
> >
> > sherm--
> >
> > --
> > Web Hosting by West Virginians, for West Virginians: http://wv-www.net
> > Cocoa programming in Perl: http://camelbones.sourceforge.net
>
> Thanks
>
> That looks like the tutorial that I need.
>
> Everybody, I'll be working through the rest of the recommendations
> today. I know that I've had problems either with my ide on osx
> recognizing net-dns module or installing it.  I'll try running a script
> outside the ide to see if that is the probem.
>
> Mike

Any Mac os x users that might want to help here.

On my OS X platform I get the following messages:

 CPAN.pm: Going to build C/CR/CREIN/Net-DNS-0.45.tar.gz

Testing if you have a C compiler and the needed header files....
cc    -c -o compile.o compile.c
You have a working compiler.
inactivity_timeout reached
Running make test
  Make had some problems, maybe interrupted? Won't test
Running make install
  Make had some problems, maybe interrupted? Won't install

I don't have this problem on either XP nor HP UX.

So I did use sudo to run perl -MCPAN -e shell

and it had no problems until the error messages

So I tried a couple other packages

Net::Syslog installed fine
-----------
Checking if your kit is complete...
Looks good
Writing Makefile for Net::Syslog
cp Syslog.pm blib/lib/Net/Syslog.pm
AutoSplitting blib/lib/Net/Syslog.pm (blib/lib/auto/Net/Syslog)
Manifying blib/man3/Net::Syslog.3pm
  /usr/bin/make  -- OK
Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-Iblib/lib" "-Iblib/arch" test.pl
1..1
ok 1
ok 2
  /usr/bin/make test -- OK
Running make install
Installing /Library/Perl/5.8.6/auto/Net/Syslog/autosplit.ix
Installing /Library/Perl/5.8.6/Net/Syslog.pm
Installing /usr/local/man/man3/Net::Syslog.3pm
Writing
/Library/Perl/5.8.6/darwin-thread-multi-2level/auto/Net/Syslog/.packlist
Appending installation info to
//System/Library/Perl/5.8.6/darwin-thread-multi-2level/perllocal.pod
  /usr/bin/make install  -- OK
-------------

However  Net-DNS-Server did not.

Thanks

Mike



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

Date: Thu, 18 Jan 2007 23:44:28 -0500
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: I/O open()
Message-Id: <m2tzyn1v83.fsf@Sherm-Pendleys-Computer.local>

"mmccaws2" <mmccaws@comcast.net> writes:

>  CPAN.pm: Going to build C/CR/CREIN/Net-DNS-0.45.tar.gz

Looks like the CPAN mirror you're using is way out of date. Chris Reinhardt
hasn't been the maintainer for Net::DNS since 2004. The current version is
0.59, and maintained by Olaf Kolkman. Running install Net::DNS gives me this:

    CPAN.pm: Going to build O/OL/OLAF/Net-DNS-0.59.tar.gz

I'm running Mac OS X 10.4 with Perl 5.8.6, same as you. I suggest running
'o conf init' in the CPAN shell and selecting a different mirror or two.

sherm--

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


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

Date: Fri, 19 Jan 2007 04:57:09 GMT
From: axel@white-eagle.invalid.uk
Subject: Re: I/O open()
Message-Id: <FcYrh.16241$Kq5.291@newsfe13.phx>

Paul Lalli <mritty@gmail.com> wrote:
> mmccaws2 wrote:
 
>>                       chomp($line);
>>                       print "$count $line\n";
 
> Why are you chomping only to print a newline at the end anyway?

Hmmm.  In general I would agree in not performing unnecessary
operations, but this would be an exception.  I have seen too many cases
where the newline has been forgotten about thus leading to mysterious
results that I feel it is useful to immediately chomp single line input
and then explicitly add newlines if required when printing.

In this example it may appear absurd... but just wait until someone
decides to throw in some code between reading and writing!

Axel



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

Date: 18 Jan 2007 23:10:59 -0800
From: "mmccaws2" <mmccaws@comcast.net>
Subject: Re: I/O open()
Message-Id: <1169190659.636047.108090@a75g2000cwd.googlegroups.com>


axel@white-eagle.invalid.uk wrote:
> Paul Lalli <mritty@gmail.com> wrote:
> > mmccaws2 wrote:
>
> >>                       chomp($line);
> >>                       print "$count $line\n";
>
> > Why are you chomping only to print a newline at the end anyway?
>
> Hmmm.  In general I would agree in not performing unnecessary
> operations, but this would be an exception.  I have seen too many cases
> where the newline has been forgotten about thus leading to mysterious
> results that I feel it is useful to immediately chomp single line input
> and then explicitly add newlines if required when printing.
>
> In this example it may appear absurd... but just wait until someone
> decides to throw in some code between reading and writing!
>
> Axel

I did this to make sure I understood how long each line was.  Basically
a sanity check.



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

Date: 18 Jan 2007 23:17:53 -0800
From: "mmccaws2" <mmccaws@comcast.net>
Subject: Re: I/O open()
Message-Id: <1169191073.020126.241770@v45g2000cwv.googlegroups.com>


Sherm Pendley wrote:
> "mmccaws2" <mmccaws@comcast.net> writes:
>
> >  CPAN.pm: Going to build C/CR/CREIN/Net-DNS-0.45.tar.gz
>
> Looks like the CPAN mirror you're using is way out of date. Chris Reinhardt
> hasn't been the maintainer for Net::DNS since 2004. The current version is
> 0.59, and maintained by Olaf Kolkman. Running install Net::DNS gives me this:
>
>     CPAN.pm: Going to build O/OL/OLAF/Net-DNS-0.59.tar.gz
>
> I'm running Mac OS X 10.4 with Perl 5.8.6, same as you. I suggest running
> 'o conf init' in the CPAN shell and selecting a different mirror or two.
>
> sherm--
>
> --
> Web Hosting by West Virginians, for West Virginians: http://wv-www.net
> Cocoa programming in Perl: http://camelbones.sourceforge.net

So far  each package I've installed related to this required force
install.  I suspect that there is something wrong done early on when I
was having difficulties.

I installed Net::Sockets and Net::DNS.

When I tried to run the example test script I got the following
errors.

Can't locate Net/IP.pm in @INC (@INC contains:
/System/Library/Perl/5.8.6/darwin-thread-multi-2level
/System/Library/Perl/5.8.6
/Library/Perl/5.8.6/darwin-thread-multi-2level /Library/Perl/5.8.6
/Library/Perl /Network/Library/Perl/5.8.6/darwin-thread-multi-2level
/Network/Library/Perl/5.8.6 /Network/Library/Perl
/System/Library/Perl/Extras/5.8.6/darwin-thread-multi-2level
/System/Library/Perl/Extras/5.8.6 /Library/Perl/5.8.1 .) at
/Library/Perl/5.8.6/darwin-thread-multi-2level/Net/DNS/Resolver/Base.pm
line 24.
BEGIN failed--compilation aborted at
/Library/Perl/5.8.6/darwin-thread-multi-2level/Net/DNS/Resolver/Base.pm
line 24.
Compilation failed in require at
/Library/Perl/5.8.6/darwin-thread-multi-2level/Net/DNS/Resolver/UNIX.pm
line 9.
BEGIN failed--compilation aborted at
/Library/Perl/5.8.6/darwin-thread-multi-2level/Net/DNS/Resolver/UNIX.pm
line 9.
Compilation failed in require at
/Library/Perl/5.8.6/darwin-thread-multi-2level/Net/DNS/Resolver.pm line
19.
BEGIN failed--compilation aborted at
/Library/Perl/5.8.6/darwin-thread-multi-2level/Net/DNS/Resolver.pm line
22.
Compilation failed in require at
/Library/Perl/5.8.6/darwin-thread-multi-2level/Net/DNS.pm line 67.
BEGIN failed--compilation aborted at
/Library/Perl/5.8.6/darwin-thread-multi-2level/Net/DNS.pm line 67.
Compilation failed in require at snstst.pl line 4.
BEGIN failed--compilation aborted at snstst.pl line 4.

Could it be my cpan settings?  How do I check that.

Mike



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

Date: 18 Jan 2007 23:56:05 -0800
From: "Ronny" <ro.naldfi.scher@gmail.com>
Subject: Re: Indirect function call via Name
Message-Id: <1169193364.792429.136520@l53g2000cwa.googlegroups.com>

Uri Guttman schrieb:
> >>>>> "R" == Ronny  <ro.naldfi.scher@gmail.com> writes:
>
>   R> Uri Guttman schrieb:
>   >>
>   >> you should still use a dispatch table as was mentioned before. it is
>   >> safer and smarter.
>
>   R> Correct, but with a dispatch table, you kind of need in advance
>   R> what functions are going to be called that way. In my particular
>   R> case, safety is not an issue.  Actually, I want to be able to
>   R> supply at run-time the function name, but the knowledge *what*
>   R> functions can be called that way are not known to the program.  Of
>   R> course this is a considerably security whole (passing function
>   R> names such as 'unlink' or 'system' to my program could produce
>   R> uncontrollable damage), but this is a very special case and so I
>   R> don't care about this risk.
>
> that makes no sense. how can you not know in advance all the functions
> you have?

Because the part which does the indirect call, is logically decoupled
from the part providing the services. You could think of two different
developers writing and maintaining them, although at the moment,
I am the only one who does.

The basic idea is that you have some module M.pm, providing functions
via export. This module is used in two ways. One is a conventional
way, in that other modules do a "use M", call the functions etc.

The other use is from a testing framework. This framework is called
by some shell scripts in a way similar to this (I'm simplifying here):

  #!/bin/zsh
  # This is script call_M.sh
  ...
  result=$(exec_M.pl FOO BAR BAZ)

exec_M.pl internally uses M, executes M::FOO(BAR,BAZ), and
writes the result to stdout.

If I would use a dispatch table within exec_M.pl, it does not only mean
that I need to encode within exec_M.pl the knowledge what functions
are present in M.pm (making them tighly coupled), it also means that
whenever the maintainer of M provides a new function in M.pm which
the maintainer of call_M.sh wants to use, the maintainer of exec_M.pl
also needs to extend the dispatch table.

> unless you are using AUTOLOAD which is only for methods (and
> methods can be called symbolically anyhow), you know your codebase. this
> isn't only about risk but design and coding technique. symrefs are evil
> in many ways. they are slower,

Speed is not an issue here. The functions itself usually take a couple
of
seconds to execute, so the overhead of one call via symref can be
neglected.

> use the symbol table as a hash (so why
> not use your own hash), require disabling strict,

Yes, though only for this one call (I embedded the no strict 'refs'
into a
block surrounding only the indirect call.

> you can't as easily
> check for missing subs,

This sure can happen (say, due to a typo in exec_M.pl), but this can
easily
be fixed in the testing phase. The program would simply die, so it is
easy to fix at
the place the shell script was executed.

As for security concerns, it is correct that the writer of the
call_M.sh script
(right now it's me too) needs to be more careful *what* to call here;
but in
no case would exec_M.pl be called with some arbitrary user input coming
from outside (which would indeed make testing easier). So no big risk
here
either.

Ronald



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

Date: Fri, 19 Jan 2007 08:43:36 +0100
From: Martijn Lievaart <m@remove.this.part.rtij.nl>
Subject: Re: Map Windows from Unix
Message-Id: <pan.2007.01.19.07.43.36.258008@remove.this.part.rtij.nl>

On Thu, 18 Jan 2007 21:24:40 +0100, Martijn Lievaart wrote:

>>>> I've used Samba to mount a remote share from a Windows PC and it 
>>>> worked just fine.
>>> Are you dense or lying deliberately?
>> The statement above is 100% true. Of course you'll never believe me...
> 
> No I don't. Samba *exports* smb shares.

Well, to retrace my steps, I didn't know about the smbsh utility, which is
quite new. From the samba website:

] It is run like a Unix shell, but it does some funky fiddling with calls
] to Unix libraries. By intercepting these calls, smbsh can make it look
] as though SMB shares are mounted. 

So no real mounting, but makes it appear so.

M4
-- 
Redundancy is a great way to introduce more single points of failure.



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

Date: Fri, 19 Jan 2007 05:42:08 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Fri Jan 19 2007
Message-Id: <JC3p68.1JGq@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.

Apache-Voodoo-2.00
http://search.cpan.org/~maverick/Apache-Voodoo-2.00/
or just Voodoo for short; is a web application framework for Apache 1.3 and 2.0
----
BatchSystem-SBS-0.10
http://search.cpan.org/~alexmass/BatchSystem-SBS-0.10/
a Simple Batch System
----
Class-InsideOut-1.04
http://search.cpan.org/~dagolden/Class-InsideOut-1.04/
a safe, simple inside-out object construction kit
----
Clutter-0.200
http://search.cpan.org/~ebassi/Clutter-0.200/
Simple GL-based canvas library
----
DateTime-0.36
http://search.cpan.org/~drolsky/DateTime-0.36/
A date and time object
----
DateTime-TimeZone-0.59
http://search.cpan.org/~drolsky/DateTime-TimeZone-0.59/
Time zone object base class and factory
----
Finance-Card-Citibank-1.03
http://search.cpan.org/~mgrimes/Finance-Card-Citibank-1.03/
Check your Citigroup credit card accounts from Perl
----
Finance-QuoteTW-0.01
http://search.cpan.org/~alec/Finance-QuoteTW-0.01/
Fetch mutual fund quotes in Taiwan
----
Kwiki-Formatter-Hatena-0.05
http://search.cpan.org/~yappo/Kwiki-Formatter-Hatena-0.05/
Kwiki Formatter with Haten Style
----
Kwiki-HatenaAuth-0.03
http://search.cpan.org/~yappo/Kwiki-HatenaAuth-0.03/
Kwiki HatenaAuth integration
----
Kwiki-HatenaAuth-0.04
http://search.cpan.org/~yappo/Kwiki-HatenaAuth-0.04/
Kwiki HatenaAuth integration
----
Math-SymbolicX-Calculator-Interface-Shell-0.02
http://search.cpan.org/~smueller/Math-SymbolicX-Calculator-Interface-Shell-0.02/
A Calculator Shell
----
Math-SymbolicX-Calculator-Interface-Web-0.01
http://search.cpan.org/~smueller/Math-SymbolicX-Calculator-Interface-Web-0.01/
An AJAXy web interface to the calculator
----
Module-Build-Convert-0.45
http://search.cpan.org/~schubiger/Module-Build-Convert-0.45/
Makefile.PL to Build.PL converter
----
POE-Component-Server-Ident-1.07
http://search.cpan.org/~bingos/POE-Component-Server-Ident-1.07/
A component that provides non-blocking ident services to your sessions.
----
POE-Component-Server-SimpleContent-1.03
http://search.cpan.org/~bingos/POE-Component-Server-SimpleContent-1.03/
The easy way to serve web content with POE::Component::Server::SimpleHTTP.
----
Params-Validate-0.87
http://search.cpan.org/~drolsky/Params-Validate-0.87/
Validate method/function parameters
----
SCALP-0.0.2
http://search.cpan.org/~xsawyerx/SCALP-0.0.2/
Simple CMS Assistant for Lazy Programmers
----
TAPx-Parser-0.50_06
http://search.cpan.org/~ovid/TAPx-Parser-0.50_06/
Parse TAP output
----
Template-Declare-0.02
http://search.cpan.org/~jesse/Template-Declare-0.02/
Perlish declarative templates
----
Text-Bidi-0.03
http://search.cpan.org/~kamensky/Text-Bidi-0.03/
Unicode bidi algorithm using libfribidi
----
XML-CommonNS-0.03
http://search.cpan.org/~perigrin/XML-CommonNS-0.03/
A list of commonly used namespaces


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/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!


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

Date: 18 Jan 2007 19:55:19 -0800
From: jcharth@hotmail.com
Subject: Re: parse body mime message
Message-Id: <1169178919.827771.214950@38g2000cwa.googlegroups.com>

Looks like something is fishy in my perl module

#!/usr/bin/perl

use MIME::Parser;
my $parser = "MIME::Parser";

#$parser->parse_data("$fullpage");
$parser->parse_data("fullpage");

#dump_entity($parser);


Content-type:text/plain

Can't use string ("MIME::Parser") as a HASH ref while "strict refs" in
use at /usr/lib/perl5/site_perl/5.8.0/MIME/Parser.pm line 279.



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

Date: Thu, 18 Jan 2007 23:33:51 -0500
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: parse body mime message
Message-Id: <m2y7nz1vps.fsf@Sherm-Pendleys-Computer.local>

jcharth@hotmail.com writes:

> Looks like something is fishy in my perl module

No, it looks like you haven't read *anything* about how to create objects
and call their methods in Perl. Neither have you read the example at the
top of the module you're using, MIME::Parser.

I suggest:

    perldoc perlboot
    perldoc perltoot
    perldoc perltooc
    perldoc perlbot

And, of course:

    perldoc MIME::Parser

> #!/usr/bin/perl
>
> use MIME::Parser;
> my $parser = "MIME::Parser";

Now $parser is a string. Not an object, just a plain old string.

> #$parser->parse_data("$fullpage");
> $parser->parse_data("fullpage");

Calling a method using a string, as you're doing here, results in a class
method being called, the same as if you had written it like this:

    MIME::Parser->parse_data('fullpage');

In a class method, $self is a string containing the class name. In an object
method, $self is a blessed reference containing instance data. Parse_data()
is an object method, so it expects a blessed reference; but since you're
calling it as a class method, it's receiving a string instead.

Hence the error:

> Can't use string ("MIME::Parser") as a HASH ref while "strict refs" in
> use at /usr/lib/perl5/site_perl/5.8.0/MIME/Parser.pm line 279.

sherm--

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


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

Date: Thu, 18 Jan 2007 23:31:51 -0800
From: Steve Leibel <stevel@bluetuna.com>
Subject: SOAP::Lite & Web Services not ready for prime time?
Message-Id: <stevel-E7AB02.23315118012007@news.giganews.com>

I've had occasion recently to need write both a SOAP client and a SOAP 
server in Perl. I found that SOAP::Lite doesn't seem to handle WSDL (web 
services definition language) very well; and it also has trouble with 
structured data such as hashes.

Even though there's even an O'Reilly book on writing Web Services in 
Perl, there doesn't seem to be much serious real world activity in this 
area.

Am I looking in the wrong places? Or are SOAP and Web Services not being 
implemented very much in Perl?


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

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 49
*************************************


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