Where to look for source of HTML::Parser

Discussion in 'Perl' started by Himanshu Garg, Jan 31, 2004.

  1. 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.
     
    Himanshu Garg, Jan 31, 2004
    #1
    1. Advertising

  2. 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
     
    Gunnar Hjalmarsson, Jan 31, 2004
    #2
    1. Advertising

  3. Gunnar Hjalmarsson <> wrote in message news:<FwFSb.47096$>...
    > 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.
     
    Himanshu Garg, Jan 31, 2004
    #3
  4. Himanshu Garg

    Joe Smith Guest

    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/
     
    Joe Smith, Jan 31, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. ZOCOR

    XML Parser VS HTML Parser

    ZOCOR, Oct 3, 2004, in forum: Java
    Replies:
    11
    Views:
    837
    Paul King
    Oct 5, 2004
  2. Cloud Burst
    Replies:
    11
    Views:
    1,091
  3. inhahe
    Replies:
    3
    Views:
    2,469
    Diez B. Roggisch
    Jan 28, 2005
  4. Zach Dennis

    HTML-Parser / SGML-Parser

    Zach Dennis, Oct 1, 2003, in forum: Ruby
    Replies:
    5
    Views:
    440
    Bernard Delmée
    Oct 1, 2003
  5. Replies:
    4
    Views:
    192
Loading...

Share This Page