}
my @packages = (
-# [ 'CPAN' , 'YUM', 'APT' ],
- [ 'Algorithm::Diff', 'yes', 'yes' ],
- [ 'CGI::Carp' , 'no' , 'no' ],
- [ 'CGI::Minimal' , 'no' , 'no' ],
- [ 'Config::Simple' , 'yes', 'yes' ],
- [ 'Data::Dumper' , 'no' , 'no' ],
- [ 'Date::Simple' , 'yes', 'yes' ],
- [ 'DateTime' , 'yes', 'yes' ],
- [ 'DBI' , 'yes', 'yes' ],
- [ 'MIME::Base64' , 'no' , 'yes' ],
- [ 'Perl6::Slurp' , 'no' , 'yes' ],
- [ 'Sort::Naturally', 'yes', 'yes' ],
- [ 'Time::Piece' , 'yes', 'yes' ],
- [ 'Time::Seconds' , 'no' , 'no' ],
- [ 'Time::HiRes' , 'no' , 'yes' ],
- [ 'Tie::IxHash' , 'yes', 'yes' ],
-# [ 'required' , 'by' , 'cgi' ],
- [ 'Encode' , 'no' , 'no' ],
- [ 'Text::Ngram' , 'no' , 'no' ],
- [ 'Time::Simple' , 'no' , 'no' ],
- [ 'List::Compare' , 'yes', 'yes' ],
- [ 'List::Util' , 'no' , 'no' ],
- [ 'XML::Atom' , 'yes', 'yes' ],
+# [ 'CPAN' , 'YUM', 'APT' ],
+ [ 'Algorithm::Diff' , 'yes', 'yes' ],
+# [ 'CGI::Carp' , 'no' , 'no' ], # in perl-CGI
+ [ 'CGI' , 'yes', 'yes' ],
+ [ 'Config::Simple' , 'yes', 'yes' ],
+ [ 'Data::Dumper::Concise', 'yes', 'yes' ],
+ [ 'Date::Simple' , 'yes', 'yes' ],
+ [ 'DateTime' , 'yes', 'yes' ],
+ [ 'DBI' , 'yes', 'yes' ],
+ [ 'MIME::Base64' , 'no' , 'yes' ],
+ [ 'File::Slurp' , 'yes', 'yes' ],
+ [ 'Sort::Naturally' , 'yes', 'yes' ],
+ [ 'Time::Piece' , 'yes', 'yes' ],
+# [ 'Time::Seconds' , 'no' , 'no' ], in perl-Time-Piece
+ [ 'Time::HiRes' , 'no' , 'yes' ],
+ [ 'Tie::IxHash' , 'yes', 'yes' ],
+# [ 'required' , 'by' , 'cgi' ],
+ [ 'Text::Ngram' , 'no' , 'no' ],
+ [ 'List::Compare' , 'yes', 'yes' ],
+# [ 'List::Util' , 'no' , 'no' ], in standard module
+ [ 'XML::Atom' , 'yes', 'yes' ],
);
if ( $redhat ) {
use MIME::Base64;
use Config::Simple;
use Time::HiRes;
-use Data::Dumper;
+use Data::Dumper::Concise;
use Tie::IxHash;
-use Perl6::Slurp;
+use File::Slurp;
use Sort::Naturally;
use Algorithm::Diff qw(LCS);
#require SVG Time::Simple XML::Atom Encode Text::Ngram List::Compare List::Util
$svg->rectangle( 'x' => 50, 'y' => $_ * 20 + 10, width => $width, height => 10 );
}
if ( $today ) {
- require Time::Simple;
- my $time = Time::Simple->new();
- my $x = ( $time->hours * 60 + $time->minutes ) * 0.5 + 50;
+ my $time = Time::Piece->localtime();
+ my $x = ( $time->hour * 60 + $time->minute ) * 0.5 + 50;
$svg->tag( 'line', x1 => $x, x2 => $x, y1 => 30, y2 => $tuner{all} * 20 + 20,
style => { stroke => 'red', 'fill-opacity' => '1.0' } );
}
if ( $mode_sub eq 'log' ) {
my $title = $params{ 'title' };
- my $log = slurp( "$recording/$title.log" ) if ( -e "$recording/$title.log" );
+ my $log = read_file( "$recording/$title.log" ) if ( -e "$recording/$title.log" );
utf8::decode( $log );
$HTML .= '<pre>'.$log."</pre>\n";
goto end;
}
sub simple_list {
- require Encode;
-
local $path = shift;
local @list = ();
$HTML =~ s|%REFRESH%|<meta http-equiv="refresh" content="300">|;
$HTML .= qq {<div>\n};
- require Data::Dumper;
- $tmp = Perl6::Slurp::slurp( 'config.ini' );
+ $tmp = read_file( 'config.ini' );
$tmp =~ s/\n/<br>\n/gs;
$HTML .= $tmp;
}
sub sqlgetsuggested {
- require Encode;
require Text::Ngram;
my ( $btime, $etime ) = @_;