Tricky has asked for the wisdom of the Perl Monks concerning the following question:

Hi all,
I'm new to the computing monastery, so please bear with me, brothers :-). I'm working on an MSc project to manipulate HTML pages 'on-the-fly' via a proxy server. Web accessibility for low-vision users is the aim, so I'd like to scan and extract tags which may inhibit such users from enjoying a Web page. I've just started working with perl, as my supervisor advised me that it was the weapon of choice for manipulating text.

I've downloaded HTML::Parser and HTML::Tree as a start.Can I use these now or must I do further bitsnbobs to insert the modules into the perl library?

Cheers,

Richard

update (broquaint): added formatting

  • Comment on Accessing source after downloading modules

Replies are listed 'Best First'.
(jeffa) Re: Accessing source after downloading modules
by jeffa (Bishop) on Jul 18, 2003 at 14:06 UTC
Re: Accessing source after downloading modules
by blue_cowdawg (Monsignor) on Jul 18, 2003 at 14:33 UTC

      I've downloaded HTML::Parser and HTML::Tree as a start

    Given that I really hate to assume about anything, but do you mean you ftp'ed the tar files and unpacked them somewhere or did you invoke

    perl -MCPAN -e 'install HTML::Parser' perl -MCPAN -e 'install HTML::Tree'

    If you did the former you should have done the latter to install the modules appropriately.

    Hope this helps.


    Peter L. BergholdBrewer of Belgian Ales
    Peter@Berghold.Netwww.berghold.net
    Unix Professional
Re: Accessing source after downloading modules
by bobn (Chaplain) on Jul 18, 2003 at 15:40 UTC

    To test whether these modules are installed, issue the following at the command line on the target system:

    perl -MHTML::Parser -MHTML::Tree -e ""

    When this gives you no error messages, both modules are installed.

    --Bob Niederman, http://bob-n.com

      Of course, if you are using ActiveState Perl, you could use ppm. Just try either:

      C:\Perl\>ppm3 install HTML::Parser C:\Perl\>ppm3 install HTML::Tree
      or
      ppm install HTML::Parser ppm install HTML::Tree

      But actually, if you're only worried about finding the tags so that they can be later removed, you could use WAVE

      WAVE is a pretty cool tool that you can pass a webpage, then it will graphically display what would cause accessibility issues. It actually even has a toolbar you can add to Internet Explorer(or probably any web browser), that you can use.

      Hope this Helps.
        Hi, Cheers for the tips. My project is based around using regexps to parse and remove HTML tags; WAVE looks cool, but can't use it! Having problems writing the mods I've made to the HTML code back to the source file on my hard drive. The 'writing to files on my hard drive' business has my legs in a twist! Rich
Re: Accessing source after downloading modules
by cleverett (Friar) on Jul 19, 2003 at 08:38 UTC
    Or the brute force method.

    1) unpack your tarball.
    2) switch into the source dir.
    3) run "perl Makefile.PL"
    4) run "make && make test && make install"

    Just being a completist.