Perl Tk with HTML

use strict;
use warnings;

use Tk;
use Tk::HyperText;

use Browser::Open qw(open_browser open_browser_cmd);

my $top = MainWindow->new;

my $html = $top->HyperText();
$html->setHandler (Resource => \&onResource);

  <title>Hello world!</title>
  <body bgcolor="#0099FF">
  <font size="6" family="Impact" color="#FFFFFF">
  <strong>Hello, world!</strong>
      <li><a href="">Perlmaven</a></li>
      <li><a href="">Code Maven</a></li>
      <li><a href="">Patreon of Gabor</a></li>


sub onResource {
    my ($html, %info) = @_;
    my $url = $info{href};
    #print $url, "\n";
    #open_browser($url); #
    #print "done\n";
    my $cmd = open_browser_cmd($url);
    # TODO: verify that the URL is well formatted before passing it to system
    if ($^O eq 'MSWin32') {
        system("$cmd $url");
    } else {
        system("$cmd $url &");