| 1 | package HTML::Display::Win32; | ||
| 2 | use strict; | ||
| 3 | use vars qw($VERSION); | ||
| 4 | $VERSION='0.40'; | ||
| 5 | |||
| 6 | =head1 NAME | ||
| 7 | |||
| 8 | HTML::Display::Win32 - display an URL through the default application for HTML | ||
| 9 | |||
| 10 | =head1 SYNOPSIS | ||
| 11 | |||
| 12 | =for example begin | ||
| 13 | |||
| 14 | my $browser = HTML::Display->new(); | ||
| 15 | $browser->display("<html><body><h1>Hello world!</h1></body></html>"); | ||
| 16 | |||
| 17 | =for example end | ||
| 18 | |||
| 19 | =head1 BUGS | ||
| 20 | |||
| 21 | Currently does not work. | ||
| 22 | |||
| 23 | Making it work will need either munging the tempfilename to | ||
| 24 | become ".html", or looking through the registry whether we find | ||
| 25 | a suitable application there. | ||
| 26 | |||
| 27 | =cut | ||
| 28 | |||
| 29 | use parent 'HTML::Display::TempFile'; | ||
| 30 | |||
| 31 | sub browsercmd { | ||
| 32 | # cmd.exe needs two arguments, command.com needs one | ||
| 33 | ($ENV{COMSPEC} =~ /cmd.exe$/i) ? 'start "HTML::Display" "%s"' : 'start "%s"' | ||
| 34 | }; | ||
| 35 | |||
| 36 | =head1 AUTHOR | ||
| 37 | |||
| 38 | Copyright (c) 2004-2013 Max Maischein C<< <corion@cpan.org> >> | ||
| 39 | |||
| 40 | =head1 LICENSE | ||
| 41 | |||
| 42 | This module is released under the same terms as Perl itself. | ||
| 43 | |||
| 44 | =cut | ||
| 45 | |||
| 46 | 1; |