Checking if your kit is complete...
Warning: the following files are missing in your kit:
.cvsignore
Please inform the author.
Writing Makefile for HTML::Display
Microsoft (R) Program Maintenance Utility Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.
cp lib/HTML/Display/Debian.pm blib\lib\HTML\Display\Debian.pm
cp lib/HTML/Display/Win32.pm blib\lib\HTML\Display\Win32.pm
cp lib/HTML/Display/Mozilla.pm blib\lib\HTML\Display\Mozilla.pm
cp lib/HTML/Display/Win32/OLE.pm blib\lib\HTML\Display\Win32\OLE.pm
cp lib/HTML/Display/Opera.pm blib\lib\HTML\Display\Opera.pm
cp lib/HTML/Display/Galeon.pm blib\lib\HTML\Display\Galeon.pm
cp lib/HTML/Display/OSX.pm blib\lib\HTML\Display\OSX.pm
cp lib/HTML/Display.pm blib\lib\HTML\Display.pm
cp lib/HTML/Display/Dump.pm blib\lib\HTML\Display\Dump.pm
cp lib/HTML/Display/Win32/IE.pm blib\lib\HTML\Display\Win32\IE.pm
cp lib/HTML/Display/Common.pm blib\lib\HTML\Display\Common.pm
cp lib/HTML/Display/TempFile.pm blib\lib\HTML\Display\TempFile.pm
cp lib/HTML/Display/Phoenix.pm blib\lib\HTML\Display\Phoenix.pm
Microsoft (R) Program Maintenance Utility Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.
C:\cpanrun\build\5-10-0\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(1, 'blib\lib', 'blib\arch')" t/*.t
t/00-HTML-Display-use.................1..16
ok 1 - use HTML::Display;
ok 2 - Default class isa HTML::Display::Common
ok 3 - The object isa HTML::Display::Common
ok 4 - HTML::Display::Capture->can('display')
ok 5 - Empty head
ok 6 - Empty head without trailing slash
ok 7 - Existing head
ok 8 - Existing head
ok 9 - Existing head 2
ok 10 - Filename in base
ok 11 - Port
ok 12 - Basic authentification
ok 13 - 'target' attribute
ok 14 - No
tag
ok 15 - No tag
ok 16 - Single Hello world!
");
# 33:
# 34: =for example end
# 35:
# 36: =for example_testing
# 37: is($::_STDOUT_,"foo\nHello world!
");
# 38:
# 39: =head1 DESCRIPTION
# 40:
# 41: This module abstracts the task of displaying HTML to the user. The
# 42: displaying is done by launching a browser and navigating it to either
# 43: a temporary file with the HTML stored in it, or, if possible, by
# 44: pushing the HTML directly into the browser window.
# 45:
# 46: The module tries to automagically select the "correct" browser, but
# 47: if it dosen't find a good browser, you can modify the behaviour by
# 48: setting some environment variables :
# 49:
# 50: PERL_HTML_DISPLAY_CLASS
# 51:
# 52: If HTML::Display already provides a class for the browser you want to
# 53: use, setting C to the name of the class will
# 54: make HTML::Display use that class instead of what it detects.
# 55:
# 56: PERL_HTML_DISPLAY_COMMAND
# 57:
# 58: If there is no specialized class yet, but your browser can be controlled
# 59: via the command line, then setting C to the
# 60: string to navigate to the URL will make HTML::Display use a C
# 61: call to the string. A C<%s> in the value will be replaced with the name
# 62: of the temporary file containing the HTML to display.
# 63:
# 64: =cut
# 65:
# 66: use vars qw( @ISA @EXPORT %os_default );
# 67: require Exporter;
# 68: @ISA='Exporter';
# 69:
# 70: @EXPORT = qw( display );
# 71:
# 72: =head2 %HTML::Display::os_default
# 73:
# 74: The hash C<%HTML::Display::os_default> contains pairs of class names
# 75: for the different operating systems and routines that test whether
# 76: this script is currently running under it. If you you want to dynamically
# 77: add a new class or replace a class (or the rule), modify C<%os_default> :
# 78:
# 79: =for example begin
# 80:
# 81: # Install class for MagicOS
# 82: $HTML::Display::os_default{"HTML::Display::MagicOS"}
# 83: = sub { $^O =~ qr/magic/i };
# 84:
# 85: =for example end
# 86:
# 87: =cut
# 88:
# 89: %os_default = (
# 90: "HTML::Display::Win32::IE" => sub {
# 91: my $have_ole;
# 92: eval {
# 93: require Win32::OLE;
# 94: Win32::OLE->import();
# 95: $have_ole = 1;
# 96: };
# 97: $have_ole and $^O =~ qr/mswin32/i
# 98: },
# 99: "HTML::Display::Debian" => sub { -x "/usr/bin/x-www-browser" },
# 100: "HTML::Display::OSX" => sub { $^O =~ qr/darwin/i },
# 101: );
# 102:
# 103: =head2 __PACKAGE__->new %ARGS
# 104:
# 105: =cut
# 106:
# 107: sub new {
# 108: my $class = shift;
# 109: my (%args) = @_;
# 110:
# 111: # First see whether the programmer or user specified a class
# 112: my $best_class = delete $args{class} || $ENV{PERL_HTML_DISPLAY_CLASS};
# 113:
# 114: # Now, did they specify a command?
# 115: unless ($best_class) {
# 116: my $command = delete $args{browsercmd} || $ENV{PERL_HTML_DISPLAY_COMMAND};
# 117: if ($command) {
# 118: $best_class = "HTML::Display::TempFile";
# 119: $args{browsercmd} = $command;
# 120: @_ = %args;
# 121: };
# 122: };
# 123:
# 124: unless ($best_class) {
# 125: for my $class (sort keys %os_default) {
# 126: $best_class = $class
# 127: if $os_default{$class}->();
# 128: };
# 129: };
# 130: $best_class ||= "HTML::Display::Dump";
# 131:
# 132: { no strict 'refs';
# 133: undef $@;
# 134: eval "use $best_class;"
# 135: unless ( @{"${best_class}::ISA"}
# 136: or defined *{"${best_class}::new"}{CODE}
# 137: or defined *{"${best_class}::AUTOLOAD"}{CODE});
# 138: croak "While trying to load $best_class: $@" if $@;
# 139: };
# 140: return $best_class->new(@_);
# 141: };
# 142:
# 143: =head2 $browser-Edisplay( %ARGS )
# 144:
# 145: Will display the HTML. The following arguments are valid :
# 146:
# 147: base => Base to which all relative links will be resolved
# 148: html => Scalar containing the HTML to be displayed
# 149: file => Scalar containing the name of the file to be displayed
# 150: This file will possibly be copied into a temporary file!
# 151:
# 152: location (synonymous to base)
# 153:
# 154: If only one argument is passed, then it is taken as if
# 155:
# 156: html => $_[0]
# 157:
# 158: was passed.
# 159:
# 160: =cut
# 161:
# 162: sub display {
# 163: my %args;
# 164: if (scalar @_ == 1) {
# 165: %args = ( html => @_ )
# 166: } else {
# 167: %args = @_
# 168: };
# 169: HTML::Display->new()->display( %args );
# 170: };
# 171:
# 172: =head1 EXPORTS
# 173:
# 174: The subroutine C is exported by default
# 175:
# 176: =head1 COMMAND LINE USAGE
# 177:
# 178: Display some HTML to the user :
# 179:
# 180: perl -MHTML::Display -e "display 'Hello world'"
# 181:
# 182: Display a web page to the user :
# 183:
# 184: perl -MLWP::Simple -MHTML::Display -e "display get 'http://www.google.com'"
# 185:
# 186: Display the same page with the images also working :
# 187:
# 188: perl -MLWP::Simple -MHTML::Display -e "display html => get('http://www.google.com'),
# 189: location => 'http://www.google.com'"
# 190:
# 191: =head1 AUTHOR
# 192:
# 193: Copyright (c) 2004-2007 Max Maischein C<< >>
# 194:
# 195: =head1 LICENSE
# 196:
# 197: This module is released under the same terms as Perl itself.
# 198:
# 199: =cut
# 200:
# 201:
# 202: 1;
# Failed test ''blib\lib/HTML/Display/Common.pm' contains no windows newlines'
# at t/99-unix-text.t line 33.
not ok 2 - 'blib\lib/HTML/Display/Common.pm' contains no windows newlines
# got: '213'
# expected: '0'
# 0: package HTML::Display::Common;
# 1:
# 2: =head1 NAME
# 3:
# 4: HTML::Display::Common - routines common to all HTML::Display subclasses
# 5:
# 6: =cut
# 7:
# 8: use strict;
# 9: use HTML::TokeParser;
# 10: use URI::URL;
# 11: use vars qw($VERSION);
# 12: $VERSION='0.39';
# 13: use Carp qw( croak );
# 14:
# 15: =head2 __PACKAGE__-Enew %ARGS
# 16:
# 17: Creates a new object as a blessed hash. The passed arguments are stored within
# 18: the hash. If you need to do other things in your constructor, remember to call
# 19: this constructor as well :
# 20:
# 21: =for example
# 22: no warnings 'redefine';
# 23: *HTML::Display::WhizBang::display_html = sub {};
# 24:
# 25: =for example begin
# 26:
# 27: package HTML::Display::WhizBang;
# 28: use parent 'HTML::Display::Common';
# 29:
# 30: sub new {
# 31: my ($class) = shift;
# 32: my %args = @_;
# 33: my $self = $class->SUPER::new(%args);
# 34:
# 35: # do stuff
# 36:
# 37: $self;
# 38: };
# 39:
# 40: =for example end
# 41:
# 42: =for example_testing
# 43: package main;
# 44: use HTML::Display;
# 45: my $browser = HTML::Display->new( class => "HTML::Display::WhizBang");
# 46: isa_ok($browser,"HTML::Display::Common");
# 47:
# 48: =cut
# 49:
# 50: sub new {
# 51: my ($class) = shift;
# 52: #croak "Odd number" if @_ % 2;
# 53: my $self = { @_ };
# 54: bless $self,$class;
# 55: $self;
# 56: };
# 57:
# 58: =head2 $display->display %ARGS
# 59:
# 60: This is the routine used to display the HTML to the user. It takes the
# 61: following parameters :
# 62:
# 63: html => SCALAR containing the HTML
# 64: file => SCALAR containing the filename of the file to be displayed
# 65: base => optional base url for the HTML, so that relative links still work
# 66:
# 67: location (synonymous to base)
# 68:
# 69: =head3 Basic usage :
# 70:
# 71: =for example
# 72: no warnings 'redefine';
# 73: *HTML::Display::new = sub {
# 74: my $class = shift;
# 75: require HTML::Display::Dump;
# 76: return HTML::Display::Dump->new(@_);
# 77: };
# 78:
# 79: =for example begin
# 80:
# 81: my $html = "Hello world!
";
# 82: my $browser = HTML::Display->new();
# 83: $browser->display( html => $html );
# 84:
# 85: =for example end
# 86:
# 87: =for example_testing
# 88: isa_ok($browser, "HTML::Display::Dump","The browser");
# 89: is( $main::_STDOUT_,"Hello world!
","HTML gets output");
# 90:
# 91: =head3 Location parameter :
# 92:
# 93: If you fetch a page from a remote site but still want to display
# 94: it to the user, the C parameter comes in very handy :
# 95:
# 96: =for example
# 97: no warnings 'redefine';
# 98: *HTML::Display::new = sub {
# 99: my $class = shift;
# 100: require HTML::Display::Dump;
# 101: return HTML::Display::Dump->new(@_);
# 102: };
# 103:
# 104: =for example begin
# 105:
# 106: my $html = '';
# 107: my $browser = HTML::Display->new();
# 108:
# 109: # This will display part of the Google logo
# 110: $browser->display( html => $html, base => 'http://www.google.com' );
# 111:
# 112: =for example end
# 113:
# 114: =for example_testing
# 115: isa_ok($browser, "HTML::Display::Dump","The browser");
# 116: is( $main::_STDOUT_,
# 117: '',
# 118: "HTML gets output");
# 119: $main::_STDOUT_ = "";
# 120: $browser->display( html => $html, location => 'http://www.google.com' );
# 121: is( $main::_STDOUT_,
# 122: '',
# 123: "HTML gets output");
# 124:
# 125: =cut
# 126:
# 127: sub display {
# 128: my ($self) = shift;
# 129: my %args;
# 130: if (scalar @_ == 1) {
# 131: %args = ( html => $_[0] );
# 132: } else {
# 133: %args = @_;
# 134: };
# 135:
# 136: if ($args{file}) {
# 137: my $filename = delete $args{file};
# 138: local $/;
# 139: local *FILE;
# 140: open FILE, "<", $filename
# 141: or croak "Couldn't read $filename";
# 142: $args{html} = ;
# 143: };
# 144:
# 145: $args{base} = delete $args{location}
# 146: if (! exists $args{base} and exists $args{location});
# 147:
# 148: my $new_html;
# 149: if (exists $args{base}) {
# 150: # trim to directory create BASE HREF
# 151: # We are carefull to not trim if we just have http://domain.com
# 152: my $location = URI::URL->new( $args{base} );
# 153: my $path = $location->path;
# 154: $path =~ s%(?scheme, $location->authority , $path;
# 156:
# 157: require HTML::TokeParser::Simple;
# 158: my $p = HTML::TokeParser::Simple->new(\$args{html}) || die 'could not create HTML::TokeParser::Simple object';
# 159: my ($has_head,$has_base);
# 160: while (my $token = $p->get_token) {
# 161: if ( $token->is_start_tag('head') ) {
# 162: $has_head++;
# 163: } elsif ( $token->is_start_tag('base')) {
# 164: $has_base++;
# 165: last;
# 166: };
# 167: };
# 168:
# 169: # restart parsing
# 170: $p = HTML::TokeParser::Simple->new(\$args{html}) || die 'could not create HTML::TokeParser::Simple object';
# 171: while (my $token = $p->get_token) {
# 172: if ( $token->is_start_tag('html') and not $has_head) {
# 173: $new_html .= $token->as_is . qq{};
# 174: } elsif ( $token->is_start_tag('head') and not $has_base) {
# 175: # handle an empty :
# 176: if ($token->as_is =~ m!^<\s*head\s*/>$!i) {
# 177: $new_html .= qq{}
# 178: } else {
# 179: $new_html .= $token->as_is . qq{};
# 180: };
# 181: } elsif ( $token->is_start_tag('base') ) {
# 182: # If they already have a , give up
# 183: if ($token->return_attr->{href}) {
# 184: $new_html = $args{html};
# 185: last;
# 186: } else {
# 187: $token->set_attr('href',$location);
# 188: $new_html .= $token->as_is;
# 189: };
# 190: } else {
# 191: $new_html .= $token->as_is;
# 192: }
# 193: };
# 194: } else {
# 195: $new_html = $args{html};
# 196: };
# 197:
# 198: $self->display_html($new_html);
# 199: };
# 200:
# 201: =head1 AUTHOR
# 202:
# 203: Copyright (c) 2004-2007 Max Maischein C<< >>
# 204:
# 205: =head1 LICENSE
# 206:
# 207: This module is released under the same terms as Perl itself.
# 208:
# 209: =cut
# 210:
# 211:
# 212: 1;
# Failed test ''blib\lib/HTML/Display/Debian.pm' contains no windows newlines'
# at t/99-unix-text.t line 33.
not ok 3 - 'blib\lib/HTML/Display/Debian.pm' contains no windows newlines
# got: '37'
# expected: '0'
# 0: package HTML::Display::Debian;
# 1: use strict;
# 2: use parent 'HTML::Display::TempFile';
# 3: use vars qw($VERSION);
# 4: $VERSION='0.39';
# 5:
# 6: =head1 NAME
# 7:
# 8: HTML::Display::Debian - display HTML using the Debian default
# 9:
# 10: =head1 SYNOPSIS
# 11:
# 12: =for example begin
# 13:
# 14: my $browser = HTML::Display->new();
# 15: $browser->display("Hello world!
");
# 16:
# 17: =for example end
# 18:
# 19: This module implements displaying HTML through the Debian default web browser
# 20: referenced as the program C.
# 21:
# 22: =cut
# 23:
# 24: sub browsercmd { "x-www-browser %s" };
# 25:
# 26: =head1 AUTHOR
# 27:
# 28: Copyright (c) 2004-2007 Max Maischein C<< >>
# 29:
# 30: =head1 LICENSE
# 31:
# 32: This module is released under the same terms as Perl itself.
# 33:
# 34: =cut
# 35:
# 36: 1;
# Failed test ''blib\lib/HTML/Display/Dump.pm' contains no windows newlines'
# at t/99-unix-text.t line 33.
not ok 4 - 'blib\lib/HTML/Display/Dump.pm' contains no windows newlines
# got: '44'
# expected: '0'
# 0: package HTML::Display::Dump;
# 1: use strict;
# 2: use parent 'HTML::Display::Common';
# 3: use vars qw($VERSION);
# 4: $VERSION='0.39';
# 5:
# 6: =head1 NAME
# 7:
# 8: HTML::Display::Dump - dump raw HTML to the console
# 9:
# 10: =head1 SYNOPSIS
# 11:
# 12: =for example
# 13: use HTML::Display;
# 14:
# 15: =for example begin
# 16:
# 17: my $browser = HTML::Display->new(
# 18: class => 'HTML::Display::Dump',
# 19: );
# 20: $browser->display("Hello world!
");
# 21:
# 22: =for example end
# 23:
# 24: =for example_testing
# 25: isa_ok($browser,"HTML::Display::Common");
# 26: is($_STDOUT_,"Hello world!
","Dumped output");
# 27: is($_STDERR_,undef,"No warnings");
# 28:
# 29: =cut
# 30:
# 31: sub display_html { print $_[1]; };
# 32:
# 33: =head1 AUTHOR
# 34:
# 35: Copyright (c) 2004-2007 Max Maischein C<< >>
# 36:
# 37: =head1 LICENSE
# 38:
# 39: This module is released under the same terms as Perl itself.
# 40:
# 41: =cut
# 42:
# 43: 1;
# Failed test ''blib\lib/HTML/Display/Galeon.pm' contains no windows newlines'
# at t/99-unix-text.t line 33.
not ok 5 - 'blib\lib/HTML/Display/Galeon.pm' contains no windows newlines
# got: '34'
# expected: '0'
# 0: package HTML::Display::Galeon;
# 1: use strict;
# 2: use parent 'HTML::Display::TempFile';
# 3: use vars qw($VERSION);
# 4: $VERSION='0.39';
# 5:
# 6: =head1 NAME
# 7:
# 8: HTML::Display::Galeon - display HTML through Galeon
# 9:
# 10: =head1 SYNOPSIS
# 11:
# 12: =for example begin
# 13:
# 14: my $browser = HTML::Display->new();
# 15: $browser->display("Hello world!
");
# 16:
# 17: =for example end
# 18:
# 19: =cut
# 20:
# 21: sub browsercmd { "galeon -n %s" };
# 22:
# 23: =head1 AUTHOR
# 24:
# 25: Copyright (c) 2004-2007 Max Maischein C<< >>
# 26:
# 27: =head1 LICENSE
# 28:
# 29: This module is released under the same terms as Perl itself.
# 30:
# 31: =cut
# 32:
# 33: 1;
# Failed test ''blib\lib/HTML/Display/Mozilla.pm' contains no windows newlines'
# at t/99-unix-text.t line 33.
not ok 6 - 'blib\lib/HTML/Display/Mozilla.pm' contains no windows newlines
# got: '34'
# expected: '0'
# 0: package HTML::Display::Mozilla;
# 1: use strict;
# 2: use parent 'HTML::Display::TempFile';
# 3: use vars qw($VERSION);
# 4: $VERSION='0.39';
# 5:
# 6: =head1 NAME
# 7:
# 8: HTML::Display::Mozilla - display HTML through Mozilla
# 9:
# 10: =head1 SYNOPSIS
# 11:
# 12: =for example begin
# 13:
# 14: my $browser = HTML::Display->new();
# 15: $browser->display("Hello world!
");
# 16:
# 17: =for example end
# 18:
# 19: =cut
# 20:
# 21: sub browsercmd { 'mozilla -remote "openURL(%s)"' };
# 22:
# 23: =head1 AUTHOR
# 24:
# 25: Copyright (c) 2004-2007 Max Maischein C<< >>
# 26:
# 27: =head1 LICENSE
# 28:
# 29: This module is released under the same terms as Perl itself.
# 30:
# 31: =cut
# 32:
# 33: 1;
# Failed test ''blib\lib/HTML/Display/Opera.pm' contains no windows newlines'
# at t/99-unix-text.t line 33.
not ok 7 - 'blib\lib/HTML/Display/Opera.pm' contains no windows newlines
# got: '38'
# expected: '0'
# 0: package HTML::Display::Opera;
# 1: use strict;
# 2: use parent 'HTML::Display::TempFile';
# 3: use vars qw($VERSION);
# 4: $VERSION='0.39';
# 5:
# 6: =head1 NAME
# 7:
# 8: HTML::Display::Galeon - display HTML through Galeon
# 9:
# 10: =head1 SYNOPSIS
# 11:
# 12: =for example begin
# 13:
# 14: my $browser = HTML::Display->new();
# 15: $browser->display("Hello world!
");
# 16:
# 17: =for example end
# 18:
# 19: =head1 ACKNOWLEDGEMENTS
# 20:
# 21: Tina Mueller provided the browser command line
# 22:
# 23: =cut
# 24:
# 25: sub browsercmd { "opera %s" };
# 26:
# 27: =head1 AUTHOR
# 28:
# 29: Copyright (c) 2004-2007 Max Maischein C<< >>
# 30:
# 31: =head1 LICENSE
# 32:
# 33: This module is released under the same terms as Perl itself.
# 34:
# 35: =cut
# 36:
# 37: 1;
# Failed test ''blib\lib/HTML/Display/OSX.pm' contains no windows newlines'
# at t/99-unix-text.t line 33.
not ok 8 - 'blib\lib/HTML/Display/OSX.pm' contains no windows newlines
# got: '36'
# expected: '0'
# 0: package HTML::Display::OSX;
# 1: use strict;
# 2: use parent 'HTML::Display::TempFile';
# 3: use vars qw($VERSION);
# 4: $VERSION='0.39';
# 5:
# 6: =head1 NAME
# 7:
# 8: HTML::Display::OSX - display HTML on OSX
# 9:
# 10: =head1 SYNOPSIS
# 11:
# 12: =for example begin
# 13:
# 14: my $browser = HTML::Display->new();
# 15: $browser->display("Hello world!
");
# 16:
# 17: =for example end
# 18:
# 19: This launches the default browser on OSX.
# 20:
# 21: =cut
# 22:
# 23: sub browsercmd { "open %s" };
# 24:
# 25: =head1 AUTHOR
# 26:
# 27: Copyright (c) 2004-2007 Max Maischein C<< >>
# 28:
# 29: =head1 LICENSE
# 30:
# 31: This module is released under the same terms as Perl itself.
# 32:
# 33: =cut
# 34:
# 35: 1;
# Failed test ''blib\lib/HTML/Display/Phoenix.pm' contains no windows newlines'
# at t/99-unix-text.t line 33.
not ok 9 - 'blib\lib/HTML/Display/Phoenix.pm' contains no windows newlines
# got: '34'
# expected: '0'
# 0: package HTML::Display::Phoenix;
# 1: use strict;
# 2: use parent 'HTML::Display::TempFile';
# 3: use vars qw($VERSION);
# 4: $VERSION='0.39';
# 5:
# 6: =head1 NAME
# 7:
# 8: HTML::Display::Phoenix - display HTML through Phoenix
# 9:
# 10: =head1 SYNOPSIS
# 11:
# 12: =for example begin
# 13:
# 14: my $browser = HTML::Display->new();
# 15: $browser->display("Hello world!
");
# 16:
# 17: =for example end
# 18:
# 19: =cut
# 20:
# 21: sub browsercmd { "phoenix %s" };
# 22:
# 23: =head1 AUTHOR
# 24:
# 25: Copyright (c) 2004-2007 Max Maischein C<< >>
# 26:
# 27: =head1 LICENSE
# 28:
# 29: This module is released under the same terms as Perl itself.
# 30:
# 31: =cut
# 32:
# 33: 1;
# Failed test ''blib\lib/HTML/Display/TempFile.pm' contains no windows newlines'
# at t/99-unix-text.t line 33.
not ok 10 - 'blib\lib/HTML/Display/TempFile.pm' contains no windows newlines
# got: '66'
# expected: '0'
# 0: package HTML::Display::TempFile;
# 1: use strict;
# 2: use parent 'HTML::Display::Common';
# 3: use vars qw($VERSION);
# 4: $VERSION='0.39';
# 5:
# 6: =head1 NAME
# 7:
# 8: HTML::Display::TempFile - base class to display HTML via a temporary file
# 9:
# 10: =head1 SYNOPSIS
# 11:
# 12: =for example begin
# 13:
# 14: package HTML::Display::External;
# 15: use parent 'HTML::Display::TempFile';
# 16:
# 17: sub browsercmd {
# 18: # Return the string to pass to system()
# 19: # %s will be replaced by the temp file name
# 20: };
# 21:
# 22: =for example end
# 23:
# 24: =cut
# 25:
# 26: sub display_html {
# 27: # We need to use a temp file for communication
# 28: my ($self,$html) = @_;
# 29:
# 30: $self->cleanup_tempfiles;
# 31:
# 32: require File::Temp;
# 33: my($tempfh, $tempfile) = File::Temp::tempfile(undef, SUFFIX => '.html');
# 34: print $tempfh $html;
# 35: close $tempfh;
# 36:
# 37: push @{$self->{delete}}, $tempfile;
# 38:
# 39: my $cmdline = sprintf($self->browsercmd, $tempfile);
# 40: system( $cmdline ) == 0
# 41: or warn "Couldn't launch '$cmdline' : $?";
# 42: };
# 43:
# 44: sub cleanup_tempfiles {
# 45: my ($self) = @_;
# 46: for my $file (@{$self->{delete}}) {
# 47: unlink $file
# 48: or warn "Couldn't remove tempfile $file : $!\n";
# 49: };
# 50: $self->{delete} = [];
# 51: };
# 52:
# 53: sub browsercmd { $_[0]->{browsercmd} };
# 54:
# 55: =head1 AUTHOR
# 56:
# 57: Copyright (c) 2004-2007 Max Maischein C<< >>
# 58:
# 59: =head1 LICENSE
# 60:
# 61: This module is released under the same terms as Perl itself.
# 62:
# 63: =cut
# 64:
# 65: 1;
# Failed test ''blib\lib/HTML/Display/Win32.pm' contains no windows newlines'
# at t/99-unix-text.t line 33.
not ok 11 - 'blib\lib/HTML/Display/Win32.pm' contains no windows newlines
# got: '46'
# expected: '0'
# 0: package HTML::Display::Win32;
# 1: use strict;
# 2: use vars qw($VERSION);
# 3: $VERSION='0.39';
# 4:
# 5: =head1 NAME
# 6:
# 7: HTML::Display::Win32 - display an URL through the default application for HTML
# 8:
# 9: =head1 SYNOPSIS
# 10:
# 11: =for example begin
# 12:
# 13: my $browser = HTML::Display->new();
# 14: $browser->display("Hello world!
");
# 15:
# 16: =for example end
# 17:
# 18: =head1 BUGS
# 19:
# 20: Currently does not work.
# 21:
# 22: Making it work will need either munging the tempfilename to
# 23: become ".html", or looking through the registry whether we find
# 24: a suitable application there.
# 25:
# 26: =cut
# 27:
# 28: use parent 'HTML::Display::TempFile';
# 29:
# 30: sub browsercmd {
# 31: # cmd.exe needs two arguments, command.com needs one
# 32: ($ENV{COMSPEC} =~ /cmd.exe$/i) ? 'start "HTML::Display" "%s"' : 'start "%s"'
# 33: };
# 34:
# 35: =head1 AUTHOR
# 36:
# 37: Copyright (c) 2004-2007 Max Maischein C<< >>
# 38:
# 39: =head1 LICENSE
# 40:
# 41: This module is released under the same terms as Perl itself.
# 42:
# 43: =cut
# 44:
# 45: 1;
# Failed test ''blib\lib/HTML/Display/Win32/IE.pm' contains no windows newlines'
# at t/99-unix-text.t line 33.
not ok 12 - 'blib\lib/HTML/Display/Win32/IE.pm' contains no windows newlines
# got: '63'
# expected: '0'
# 0: package HTML::Display::Win32::IE;
# 1: use strict;
# 2: use Carp qw(carp);
# 3: use parent 'HTML::Display::Win32::OLE';
# 4: use vars qw($VERSION);
# 5: $VERSION='0.39';
# 6:
# 7: =head1 NAME
# 8:
# 9: HTML::Display::Win32::IE - use IE to display HTML pages
# 10:
# 11: =head1 SYNOPSIS
# 12:
# 13: =for example begin
# 14:
# 15: my $browser = HTML::Display->new(
# 16: class => 'HTML::Display::Dump',
# 17: );
# 18: $browser->display("Hello world!
");
# 19:
# 20: =for example end
# 21:
# 22: This implementation avoids temporary files by using OLE to push
# 23: the HTML directly into the browser.
# 24:
# 25: =cut
# 26:
# 27: sub new {
# 28: my ($class) = @_;
# 29: my $self = $class->SUPER::new( app_string => "InternetExplorer.Application" );
# 30: $self;
# 31: };
# 32:
# 33: sub setup {
# 34: my ($self,$control) = @_;
# 35: #warn "Setting up browser";
# 36: $control->{'Visible'} = 1;
# 37: $control->Navigate('about:blank');
# 38: };
# 39:
# 40: sub display_html {
# 41: my ($self,$html) = @_;
# 42: if ($html) {
# 43: my $browser = $self->control;
# 44: my $document = $browser->{Document};
# 45: $document->open("text/html","replace");
# 46: $document->write($html);
# 47: } else {
# 48: carp "No HTML given" unless $html;
# 49: };
# 50: };
# 51:
# 52: =head1 AUTHOR
# 53:
# 54: Copyright (c) 2004-2007 Max Maischein C<< >>
# 55:
# 56: =head1 LICENSE
# 57:
# 58: This module is released under the same terms as Perl itself.
# 59:
# 60: =cut
# 61:
# 62: 1;
# Failed test ''blib\lib/HTML/Display/Win32/OLE.pm' contains no windows newlines'
# at t/99-unix-text.t line 33.
not ok 13 - 'blib\lib/HTML/Display/Win32/OLE.pm' contains no windows newlines
# got: '81'
# expected: '0'
# 0: package HTML::Display::Win32::OLE;
# 1: use strict;
# 2: use parent 'HTML::Display::Common';
# 3: use vars qw($VERSION);
# 4: $VERSION='0.39';
# 5:
# 6: =head1 NAME
# 7:
# 8: HTML::Display::Win32::OLE - use an OLE object to display HTML
# 9:
# 10: =head1 SYNOPSIS
# 11:
# 12: =for example begin
# 13:
# 14: package HTML::Display::Win32::OleControl;
# 15: use parent 'HTML::Display::Win32::OLE';
# 16:
# 17: sub new {
# 18: my $class = shift;
# 19: $class->SUPER::new( app_string => "FooBrowser.Application", @_ );
# 20: $self;
# 21: };
# 22:
# 23: my $browser = HTML::Display->new(
# 24: class => 'HTML::Display::Win32::OleControl',
# 25: );
# 26: $browser->display("Hello world!
");
# 27:
# 28: =for example end
# 29:
# 30: =cut
# 31:
# 32: sub new {
# 33: my ($class) = shift;
# 34: my %args = @_;
# 35:
# 36: my $self = $class->SUPER::new( %args );
# 37: $self;
# 38: };
# 39:
# 40: =head2 setup
# 41:
# 42: C is a method you can override to provide initial
# 43: setup of your OLE control. It is called after the control
# 44: is instantiated for the first time.
# 45:
# 46: =cut
# 47:
# 48: sub setup {};
# 49:
# 50: =head2 control
# 51:
# 52: This initializes the OLE control and returns it. Only one
# 53: control is initialized for each object instance. You don't need
# 54: to store it separately.
# 55:
# 56: =cut
# 57:
# 58: sub control {
# 59: my $self = shift;
# 60: unless ($self->{control}) {
# 61: eval "use Win32::OLE";
# 62: die $@ if $@;
# 63: my $control = Win32::OLE->CreateObject($self->{app_string});
# 64: $self->{control} = $control;
# 65: $self->setup($control);
# 66: };
# 67: $self->{control};
# 68: };
# 69:
# 70: =head1 AUTHOR
# 71:
# 72: Copyright (c) 2004-2007 Max Maischein C<< >>
# 73:
# 74: =head1 LICENSE
# 75:
# 76: This module is released under the same terms as Perl itself.
# 77:
# 78: =cut
# 79:
# 80: 1;
# Looks like you failed 13 tests of 13.
dubious
Test returned status 13 (wstat 3328, 0xd00)
DIED. FAILED tests 1-13
Failed 13/13 tests, 0.00% okay
t/embedded-HTML-Display-Common........Name "HTML::Display::WhizBang::display_html" used only once: possible typo at lib/HTML/Display/Common.pm line 23.
ok 1 - example from line 22
ok 2 - The object isa HTML::Display::Common
ok 3 - example from line 72
ok 4 - The browser isa HTML::Display::Dump
ok 5 - HTML gets output
ok 6 - example from line 97
ok 7 - The browser isa HTML::Display::Dump
ok 8 - HTML gets output
ok 9 - HTML gets output
1..9
ok
t/embedded-HTML-Display-Debian........ok 1 - example from line 13
1..1
ok
t/embedded-HTML-Display-Dump..........ok 1 - example from line 13
ok 2 - The object isa HTML::Display::Common
ok 3 - Dumped output
ok 4 - No warnings
1..4
ok
t/embedded-HTML-Display-Galeon........ok 1 - example from line 13
1..1
ok
t/embedded-HTML-Display-Mozilla.......ok 1 - example from line 13
1..1
ok
t/embedded-HTML-Display-Opera.........ok 1 - example from line 13
1..1
ok
t/embedded-HTML-Display-OSX-Camino....ok 1 - example from line 13
1..1
ok
t/embedded-HTML-Display-OSX-Safari....ok 1 - example from line 13
1..1
ok
t/embedded-HTML-Display-OSX...........ok 1 - example from line 13
1..1
ok
t/embedded-HTML-Display-Phoenix.......ok 1 - example from line 13
1..1
ok
t/embedded-HTML-Display-TempFile......ok 1 - example from line 13
1..1
ok
t/embedded-HTML-Display-Win32-IE......ok 1 - example from line 14
1..1
ok
t/embedded-HTML-Display-Win32-OLE.....ok 1 - example from line 13
1..1
ok
t/embedded-HTML-Display-Win32.........ok 1 - example from line 12
1..1
ok
t/embedded-HTML-Display...............ok 1 - example from line 15
ok 2
ok 3 - example from line 81
1..3
ok
Failed Test Stat Wstat Total Fail List of Failed
-------------------------------------------------------------------------------
t/99-unix-text.t 13 3328 13 13 1-13
Failed 1/21 test scripts. 13/93 subtests failed.
Files=21, Tests=93, 3 wallclock secs ( 0.00 cusr + 0.00 csys = 0.00 CPU)
Failed 1/21 test programs. 13/93 subtests failed.
NMAKE : fatal error U1077: 'C:\cpanrun\build\5-10-0\bin\perl.exe' : return code '0xff'
Stop.