1
package Pod::HtmlPsPdf::RunTime;
5
%Pod::HtmlPsPdf::RunTime::options = ();
7
# check whether we have a Storable avalable
8
eval {require Storable;};
9
my $Storable_exists = $@ ? 0 : 1;
11
########################
12
sub set_runtime_options{
13
%Pod::HtmlPsPdf::RunTime::options = %{+shift};
14
} # end of sub set_runtime_options
16
# returns 1 if true, 0 -- otherwise
17
#######################
18
sub has_storable_module{
20
# ps2html is bundled, so we can create PS
21
return $Storable_exists;
23
} # end of sub has_storable_module
25
# returns 1 if true, 0 -- otherwise
29
# ps2html is bundled, so we can always create PS
32
# if you unbundle it make sure you write here a code similar to
35
} # end of sub can_create_ps
37
# returns 1 if true, 0 -- otherwise
41
# check whether ps2pdf exists
42
my $ps2pdf_exists = which( 'ps2pdf' );
44
print(qq{It seems that you do not have ps2pdf installed! You have
45
to install it if you want to generate the PDF file
48
unless $ps2pdf_exists;
51
} # end of sub can_create_pdf
56
foreach my $dir (split( ':', $ENV{PATH})) {
57
return "$dir/$cmd" if -x "$dir/$cmd";