always load Data::Dumper
Data::Dumper is in core sice Perl 5.005, so set a minimum Perl dependency and always load Data::Dumper.
This commit is contained in:
parent
2a8e12db63
commit
66d132cd4b
1 changed files with 9 additions and 14 deletions
|
@ -36,14 +36,20 @@
|
||||||
# http://forge.mysql.com/projects/view.php?id=44
|
# http://forge.mysql.com/projects/view.php?id=44
|
||||||
#
|
#
|
||||||
package main;
|
package main;
|
||||||
|
|
||||||
|
use 5.005;
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
|
|
||||||
use diagnostics;
|
use diagnostics;
|
||||||
use File::Spec;
|
use File::Spec;
|
||||||
use Getopt::Long;
|
use Getopt::Long;
|
||||||
use File::Basename;
|
use File::Basename;
|
||||||
use Cwd 'abs_path';
|
use Cwd 'abs_path';
|
||||||
|
|
||||||
|
use Data::Dumper;
|
||||||
|
$Data::Dumper::Pair = " : ";
|
||||||
|
|
||||||
# Set up a few variables for use in the script
|
# Set up a few variables for use in the script
|
||||||
my $tunerversion = "1.6.1";
|
my $tunerversion = "1.6.1";
|
||||||
my ( @adjvars, @generalrec );
|
my ( @adjvars, @generalrec );
|
||||||
|
@ -2792,30 +2798,19 @@ END_TEMPLATE
|
||||||
}
|
}
|
||||||
sub dump_result {
|
sub dump_result {
|
||||||
if ($opt{'debug'}) {
|
if ($opt{'debug'}) {
|
||||||
|
|
||||||
if (try_load('Data::Dumper')) {
|
|
||||||
badprint "Data::Dumper Module is needed.";
|
|
||||||
exit 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
use Data::Dumper qw/Dumper/;
|
|
||||||
$Data::Dumper::Pair = " : ";
|
|
||||||
debugprint Dumper( \%result );
|
debugprint Dumper( \%result );
|
||||||
}
|
}
|
||||||
|
|
||||||
debugprint "HTML REPORT: $opt{'reportfile'}";
|
debugprint "HTML REPORT: $opt{'reportfile'}";
|
||||||
|
|
||||||
if ($opt{'reportfile'} ne 0 ) {
|
if ($opt{'reportfile'} ne 0 ) {
|
||||||
if (try_load('Text::Template')) {
|
if (try_load('Text::Template')) {
|
||||||
badprint "Text::Template Module is needed.";
|
badprint "Text::Template Module is needed.";
|
||||||
exit 1;
|
exit 1;
|
||||||
}
|
}
|
||||||
if (try_load('Data::Dumper')) {
|
|
||||||
badprint "Data::Dumper Module is needed.";
|
|
||||||
exit 1;
|
|
||||||
}
|
|
||||||
use Text::Template;
|
use Text::Template;
|
||||||
use Data::Dumper qw/Dumper/;
|
|
||||||
$Data::Dumper::Pair = " : ";
|
|
||||||
my $vars= {'data' => Dumper( \%result ) };
|
my $vars= {'data' => Dumper( \%result ) };
|
||||||
|
|
||||||
my $template = Text::Template->new(TYPE => 'STRING', PREPEND => q{;}, SOURCE => $templateModel)
|
my $template = Text::Template->new(TYPE => 'STRING', PREPEND => q{;}, SOURCE => $templateModel)
|
||||||
|
|
Loading…
Reference in a new issue