Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Is there any Perl Module to handle HTML Pages

by Tester (Initiate)
on May 19, 2006 at 06:33 UTC ( [id://550425]=perlquestion: print w/replies, xml ) Need Help??

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

This node falls below the community's threshold of quality. You may see it by logging in.
  • Comment on Is there any Perl Module to handle HTML Pages

Replies are listed 'Best First'.
Re: Is there any Perl Module to handle HTML Pages
by davorg (Chancellor) on May 19, 2006 at 08:12 UTC

    What do you mean by "Handling HTML Pages"?

    If you want to create HTML pages, then most people would recommend that you use a templating module like the Template Tookkit, Mason or HTML::Template. Alternatively CGI.pm has many functions for creating individual HTML components.

    If you want to parse an HTML page then use HTML::Parser or one of its subclasses.

    Or did you mean something else?

    --
    <http://dave.org.uk>

    "The first rule of Perl club is you do not talk about Perl club."
    -- Chip Salzenberg

      I need to track the messages on HTML Pages & then click Buttons with respect to the sentences, for example while a processing is running , HTML page will display status - "Processing" Once the job get completed pages displays "Completed" Then i need to press few buttons. So, i need to track this message, click some buttons & finally exit.

        Sounds like you want to automate interaction with a web page. If that's the case then I second gellyfish's recommendation for WWW::Mechanise.

        --
        <http://dave.org.uk>

        "The first rule of Perl club is you do not talk about Perl club."
        -- Chip Salzenberg

        (I'm a bit unclear as to if you are writing something that produces webpages, or something that tests the production of webpages by something else. I'm assuming the former for this:)

        Writing web applications (which I assume you are doing, as I've very very rarely seen HTML used in other types of application) is fundamentally different from writing regular GUI applications. It is a client-server system with a stateless protocol.

        The server cannot send any data to the client except in response to a request from the client, and there is no built in way to tell one client from another.

        So, one way to do what you want is to identify users with sessions, and when the request to start the long process comes in, fork it into the background and have it set a flag (probably in a database) when it is finished, then have the browser (using client side code such as a meta refresh or (buzzword alert) Ajax) make requests every $n seconds to another process which checks the status of the aforementioned flag.

        I'm not aware of anything which implements all this in one module, but something like Catalyst or CGI::Application may be the way to go.

Re: Is there any Perl Module to handle HTML Pages
by jesuashok (Curate) on May 19, 2006 at 07:14 UTC
      Thanks jesuashok, I need to automate the things which are in HTML pages, by tracking certain message in the HTML pages need to identify & click the button using perl. I looking something similar to Perl Win32::GUI modules... Regards Deepak
Re: Handling HTML Pages using Perl Module
by Polonius (Friar) on May 19, 2006 at 07:31 UTC

    Deepak,

    Have you tried CGI.pm, especially the section on fill-out forms? Is that the sort of thing you're looking for?

    Polonius

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://550425]
Approved by bart
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (7)
As of 2024-04-19 15:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found