ToTk.pm revision 7c478bd95313f5f23a4c958a745db2134aa03244
require 5;
use strict;
use warnings;
sub is_pageable { 1 }
sub write_with_binmode { 0 }
sub if_zero_length { } # because it will be 0-length!
sub new { return bless {}, ref($_[0]) || $_[0] }
# TODO: document these and their meanings...
use Tk;
# The following was adapted from "tkpod" in the Tk-Pod dist.
sub parse_from_file {
my($self, $Input_File) = @_;
if($self->{'forky'}) {
return if fork; # i.e., parent process returns
}
$Input_File =~ s{\\}{/}g
# and maybe OS/2
;
#require Tk::ErrorDialog;
# Add 'Tk' subdirectories to search path so, e.g.,
if( $tk_opt ) {
}
my $mw = MainWindow->new();
# CDE use Font Settings if available
}
'-file' => $Input_File,
)->focusNext;
# xxx dirty but it works. A simple $mw->destroy if $mw->children
# does not work because Tk::ErrorDialogs could be created.
# (they are withdrawn after Ok instead of destory'ed I guess)
# ErrorDialog is withdrawn not deleted :-(
}
});
} else {
}
#$mw->WidgetDump;
MainLoop();
return;
}
1;
=head1 NAME
Pod::Perldoc::ToTk - let Perldoc use Tk::Pod to render Pod
=head1 SYNOPSIS
perldoc -o tk Some::Modulename &
=head1 DESCRIPTION
This is a "plug-in" class that allows Perldoc to use
Tk::Pod as a formatter class.
You have to have installed Tk::Pod first, or this class won't load.
=head1 SEE ALSO
L<Tk::Pod>, L<Pod::Perldoc>
=head1 AUTHOR
Sean M. Burke C<sburke@cpan.org>, with significant portions copied from
F<tkpod> in the Tk::Pod dist, by Nick Ing-Simmons, Slaven Rezic, et al.
=cut