HTML::Display::Common

HTML::Display::Common is a Perl module with routines common to all HTML::Display subclasses.
Download

HTML::Display::Common Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Max Maischein
  • Publisher web site:
  • http://search.cpan.org/~corion/

HTML::Display::Common Tags


HTML::Display::Common Description

HTML::Display::Common is a Perl module with routines common to all HTML::Display subclasses. HTML::Display::Common is a Perl module with routines common to all HTML::Display subclasses.__PACKAGE__->new %ARGSCreates a new object as a blessed hash. The passed arguments are stored within the hash. If you need to do other things in your constructor, remember to call this constructor as well : package HTML::Display::WhizBang; use base 'HTML::Display::Common'; sub new { my ($class) = shift; my %args = @_; my $self = $class->SUPER::new(%args); # do stuff $self; };$display->display %ARGSThis 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 >< /body >< /html >'; my $browser = HTML::Display->new(); # This will display part of the Google logo $browser->display( html => $html, base => 'http://www.google.com' ); Requirements: · Perl


HTML::Display::Common Related Software