HTML::...32::OLE(3pm)

πŸ“¦
version 0.40 Β· 3 versions
, in ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– HTML::...32::OLE πŸ’–

okay so hi bestie πŸ’… welcome to the User Contributed Perl Documentation page for HTML::...32::OLE(3pm) β€” yes that name is giving "the filename got chopped in half by the man renderer", don't worry about it, that's just how it is. this whole page is short and sweet and honestly kinda iconic for it. let's go 🫢


✨ NAME ✨

HTML::Display::Win32::OLE β€” use an OLE object to display HTML

that's it. that's the whole job. it uses an OLE object to display HTML. slay.


🌸 SYNOPSIS 🌸

the vibe is: you subclass it, you hand it an app_string, you let it cook. copy this exactly, character for character, no cap:

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>");

so you define your own class, inherit from HTML::Display::Win32::OLE, and your new calls SUPER::new passing app_string => "FooBrowser.Application" (that string is your OLE application, bestie β€” swap it for whatever OLE thing you're driving πŸ¦‹). then you spin up a browser with HTML::Display->new( class => 'HTML::Display::Win32::OleControl' ) and hit it with ->display(...), and boom πŸ’₯ your HTML shows up. main character energy fr fr.

🌈 setup

setup is a method you can override to provide initial setup of your OLE control. it gets called after the control is instantiated for the first time β€” so it's your lil "first day on the job" moment, do your decorating there ✨

🧚 control

this initializes the OLE control and returns it. and here's the lowkey important bit: only one control is initialized for each object instance, so you don't need to store it separately. it's already got you. she's holding your bag πŸ‘œ


πŸ‘‘ AUTHOR πŸ‘‘

Copyright (c) 2004-2007 Max Maischein "<corion@cpan.org>"

(2004 to 2007?? period piece. vintage. antique even. still slaying tho πŸ’œ)


πŸŽ€ LICENSE πŸŽ€

This module is released under the same terms as Perl itself.

bestie reminder: "same terms as Perl itself" means exactly that and nothing else β€” don't go inventing your own license lore okay πŸ₯°

and that's the whole page!! short king behavior, we love to see it. this one's from perl v5.36.0, dated 2022-10-15, and you found it under the name HTML::...32::OLE(3pm) in the User Contributed Perl Documentation section. go display some HTML πŸ’–βœ¨πŸŒΈ

πŸ“¦ where this page comes from