HTML::Display::Common
routines common to all HTML::Display subclasses
- Provided by: libhtml-display-perl (Version: 0.40-2)
- Report a bug
routines common to all HTML::Display subclasses
This is the routine used to display the HTML to the user. It takes the following parameters :
html => SCALAR containing the HTML file => SCALAR containing the filename of the file to be displayed base => optional base url for the HTML, so that relative links still work location (synonymous to base)
Basic usage :
my $html = "<html><body><h1>Hello world!</h1></body></html>"; my $browser = HTML::Display->new(); $browser->display( html => $html );
Location parameter :
If you fetch a page from a remote site but still want to display it to the user, the "location" parameter comes in very handy :
my $html = '<html><body><img src="/images/hp0.gif"></body></html>'; my $browser = HTML::Display->new(); # This will display part of the Google logo $browser->display( html => $html, base => 'http://www.google.com' );
Copyright (c) 2004-2013 Max Maischein "<corion@cpan.org>"
This module is released under the same terms as Perl itself.