use strict; use warnings; use Getopt::Long; use Prima; use Prima::HelpViewer; use Prima::Application name => 'POD viewer'; use Prima::Image::base64; use Prima::sys::GUIException; package SoleHelpViewer; use vars qw(@ISA %profile_default); @ISA = qw(Prima::PodViewWindow); sub profile_default { my $def = $_[ 0]-> SUPER::profile_default; @$def{keys %profile_default} = values %profile_default; $def->{icon} = Prima::Image::base64->load_image(< SUPER::on_destroy; $::application-> close unless @Prima::HelpViewer::helpWindows; } package main; my %opt = ( help => 0, geometry => undef, ); sub usage { print < size; my $p = \ %SoleHelpViewer::profile_default; $p->{width} = $w; $p->{height} = $h; $p->{sizeDontCare} = 0; if ( defined $x ) { $p->{left} = $x; $p->{bottom} = $y; $p->{left} = $desktop[0] - $w - $x if $sx eq '-'; $p->{bottom} = $desktop[1] - $h - $y - $::application-> get_system_value(sv::YTitleBar) - $::application-> get_system_value(sv::YMenu) if $sy eq '+'; $p->{originDontCare} = 0; } } $Prima::HelpViewer::windowClass = 'SoleHelpViewer'; my $htx = ( @ARGV ? $ARGV[0] : $0 ); if ( -f $htx) { $htx = "file://$htx"; } else { $htx .= '/' unless $htx =~ /\//; } $::application-> open_help( $htx); run Prima; =pod =head1 NAME podview - graphical pod viewer =head2 DESCRIPTION A small GUI browser for POD format. Given the argument either as a file path, or perl module name (f.ex. I), displays the documentation found. =head2 SEE ALSO L - the Plain Old Documentation format L - perl graphic toolkit the viewer is based on L - menu commands explained L - how to add help content =head1 AUTHORS Dmitry Karasik Edmitry@karasik.eu.orgE =cut