468,736 Members | 2,119 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,736 developers. It's quick & easy.

Where to look for source of HTML::Parser

Hello,

I am trying to pinpoint an apparent bug in HTML::Parser. The
encoding of the text seems to change incorrectly if the locale isn't
set properly.

However Parser.pm in the directory
(/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi/HTML/)
doesn't seem to contain the "real" parsing statements.

Could you tell me where to look for the "real" code.

Thank You
Himanshu.
Jul 19 '05 #1
3 2861
Himanshu Garg wrote:
I am trying to pinpoint an apparent bug in HTML::Parser. The
encoding of the text seems to change incorrectly if the locale
isn't set properly.

However Parser.pm in the directory
(/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi/HTML/)
doesn't seem to contain the "real" parsing statements.

Could you tell me where to look for the "real" code.


HTML::Parser requires HTML::Entities, and it's probably the latter you
want to study.

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

Jul 19 '05 #2
Gunnar Hjalmarsson <no*****@gunnar.cc> wrote in message news:<Fw********************@newsb.telia.net>...
Himanshu Garg wrote:
I am trying to pinpoint an apparent bug in HTML::Parser. The
encoding of the text seems to change incorrectly if the locale
isn't set properly.

However Parser.pm in the directory
(/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi/HTML/)
doesn't seem to contain the "real" parsing statements.

Could you tell me where to look for the "real" code.


HTML::Parser requires HTML::Entities, and it's probably the latter you
want to study.

No it is not the one I am looking for. HTML/Entities.pm merely encodes
and decodes entities.

I am looking for where other things like tags, their attributes etc
are handled and I do not find them in either of these.

Nevertheless, I thank you very much for your reply.

Thank You
++imanshu.
Jul 19 '05 #3
Himanshu Garg wrote:
Hello,

I am trying to pinpoint an apparent bug in HTML::Parser. The
encoding of the text seems to change incorrectly if the locale isn't
set properly.

However Parser.pm in the directory
(/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi/HTML/)
doesn't seem to contain the "real" parsing statements.

Could you tell me where to look for the "real" code.


Take a look at the beginning of the perl module.
/usr/local/lib/perl5/site_perl/5.8.0/sun4-solaris/HTML/Parser.pm
require DynaLoader;
@ISA=qw(DynaLoader);
HTML::Parser->bootstrap($VERSION);
That means Parser.pm uses Parser.so (and Parser.bs).

/usr/local/lib/perl5/site_perl/5.8.0/sun4-solaris/auto/HTML/Parser/.packlist
/usr/local/lib/perl5/site_perl/5.8.0/sun4-solaris/auto/HTML/Parser/Parser.bs
/usr/local/lib/perl5/site_perl/5.8.0/sun4-solaris/auto/HTML/Parser/Parser.so

The *.so files are built from *.h and *.c files.
..cpan/build/HTML-Parser-3.34/hctype.h
..cpan/build/HTML-Parser-3.34/hparser.c
..cpan/build/HTML-Parser-3.34/hparser.h
..cpan/build/HTML-Parser-3.34/Parser.bs
..cpan/build/HTML-Parser-3.34/Parser.c
..cpan/build/HTML-Parser-3.34/Parser.o
..cpan/build/HTML-Parser-3.34/Parser.pm
..cpan/build/HTML-Parser-3.34/Parser.xs
..cpan/build/HTML-Parser-3.34/pfunc.h

--
I love my TiVo - http://www.inwap.com/u/joe/tivo/
Jul 19 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Divya Rao | last post: by
6 posts views Thread by wilk | last post: by
2 posts views Thread by Craig Kenisston | last post: by
2 posts views Thread by David Virgil Hobbs | last post: by
1 post views Thread by Aaron Gray | last post: by
5 posts views Thread by Johannes Bauer | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
xarzu
2 posts views Thread by xarzu | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.