RE: perl




$ perldoc -m HTML::Entities is very helpful.
It displays source and all methods including methods that the authour has hidden from you.

Percy

Date: Mon, 28 Jul 2008 14:35:35 -0400
From: bacchi@xxxxxxx
To: redhat-list@xxxxxxxxxx
Subject: Re: perl

There's no such thing as a quick Perl question. :)

Your declaration looks wrong to me. I don't know what the ":DEFAULT"
means in your declaration, but I don't see it in the documentation on CPAN.

Try declaring it the way the docs suggest.
__________________________________________________________
If you prefer not to import these routines into your namespace, you can
call them as:

use HTML::Entities ();
$decoded = HTML::Entities::decode($a);
$encoded = HTML::Entities::encode($a);
$encoded = HTML::Entities::encode_numeric($a);
______________________________________________________________

Here's the link at CPAN to the usage.
http://search.cpan.org/~gaas/HTML-Parser-3.56/lib/HTML/Entities.pm



m.roth2006@xxxxxxx wrote:
A quick perl question: I've got this script I found, and I'm trying to run. It required me to install XML::RSS. Now, when I try to run it, it complains
"encode_entities_numeric" is not exported by the HTML::Entities module
Can't continue after import errors at /usr/lib/perl5/site_perl/5.8.0/XML/RSS.pm line 5
So, I do what the docs say, I think, in adding a line to my script of
use HTML::Entities qw(:DEFAULT encode_entities_numeric);

and now I get just
"encode_entities_numeric" is not exported by the HTML::Entities module
as my script gags when I put that as the first use statement.

Where the blazes am I supposed to put that use statement, in the HTML::Entities? In the XML::RSS?

mark


--
veritatas simplex oratio est
-Seneca

Andrew Bacchi
Systems Programmer
Rensselaer Polytechnic Institute
phone: 518.276.6415 fax: 518.276.2809

http://www.rpi.edu/~bacchi/

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

_________________________________________________________________
Searching for the best deals on travel? Visit MSN Travel.
http://msn.coxandkings.co.in/cnk/cnk.do--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list



Relevant Pages

  • Re: First Perl Program
    ... > I decided Perl was the best tool for the job. ... should be declared in the foreach declaration. ... This is a readability issue, ... I recommend changing your splitfunction so that it ...
    (comp.lang.perl.misc)
  • Re: DBI selectall_hashref
    ... smallest applicable lexical scope unless you have a positive reason to ... For Perl this means that most of the time the declaration of scalars ... if you leave it too long you may never adjust ...
    (comp.lang.perl.misc)
  • Re: grabbing array vlaues in a loop where array is redefined
    ... For Perl this means that most of the time the declaration of scalars ... should be combined with the first assignment. ... may never adjust and may mutate into a bitter and twisted troll. ...
    (comp.lang.perl.misc)
  • Re: HTML parsing
    ... > I am completely new to Perl and am needing some help with a short script I ... Your text callback can then sent a flag to tell the link callback to ... You are suffering from preature declaration again. ...
    (comp.lang.perl.modules)
  • Re: Static Typing in Python
    ... >>what I wanted to stress was that it's the explicit ... > declaration, and yet Perl is not statically typed. ... > think there is enough evidence in existing Python ...
    (comp.lang.python)