| HTML-Display documentation | Contained in the HTML-Display distribution. |
HTML::Display::Win32::OLE - use an OLE object to display HTML
package HTML::Display::Win32::OleControl;
use parent 'HTML::Display::Win32::OLE';
sub new {
my $class = shift;
$class->SUPER::new( app_string => "FooBrowser.Application", @_ );
$self;
};
my $browser = HTML::Display->new(
class => 'HTML::Display::Win32::OleControl',
);
$browser->display("<html><body><h1>Hello world!</h1></body></html>");
setup is a method you can override to provide initial
setup of your OLE control. It is called after the control
is instantiated for the first time.
This initializes the OLE control and returns it. Only one control is initialized for each object instance. You don't need to store it separately.
Copyright (c) 2004-2007 Max Maischein <corion@cpan.org>
This module is released under the same terms as Perl itself.
| HTML-Display documentation | Contained in the HTML-Display distribution. |
package HTML::Display::Win32::OLE; use strict; use parent 'HTML::Display::Common'; use vars qw($VERSION); $VERSION='0.39';
sub new { my ($class) = shift; my %args = @_; my $self = $class->SUPER::new( %args ); $self; };
sub setup {};
sub control { my $self = shift; unless ($self->{control}) { eval "use Win32::OLE"; die $@ if $@; my $control = Win32::OLE->CreateObject($self->{app_string}); $self->{control} = $control; $self->setup($control); }; $self->{control}; };
1;