mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-08 11:07:58 +00:00
Update Percona::Toolkit in all tools.
This commit is contained in:
57
bin/pt-agent
57
bin/pt-agent
@@ -52,7 +52,7 @@ BEGIN {
|
|||||||
{
|
{
|
||||||
package Percona::Toolkit;
|
package Percona::Toolkit;
|
||||||
|
|
||||||
our $VERSION = '2.2.2';
|
our $VERSION = '2.2.3';
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use warnings FATAL => 'all';
|
use warnings FATAL => 'all';
|
||||||
@@ -1726,10 +1726,27 @@ sub update_check_times {
|
|||||||
my $vc_file = $args{vc_file} || version_check_file();
|
my $vc_file = $args{vc_file} || version_check_file();
|
||||||
PTDEBUG && _d('Updating last check time:', $now);
|
PTDEBUG && _d('Updating last check time:', $now);
|
||||||
|
|
||||||
|
my %all_instances = map {
|
||||||
|
$_->{id} => { name => $_->{name}, ts => $now }
|
||||||
|
} @$instances;
|
||||||
|
|
||||||
|
if ( -f $vc_file ) {
|
||||||
|
open my $fh, '<', $vc_file or die "Cannot read $vc_file: $OS_ERROR";
|
||||||
|
my $contents = do { local $/ = undef; <$fh> };
|
||||||
|
close $fh;
|
||||||
|
|
||||||
|
foreach my $line ( split("\n", ($contents || '')) ) {
|
||||||
|
my ($id, $ts) = split(',', $line);
|
||||||
|
if ( !exists $all_instances{$id} ) {
|
||||||
|
$all_instances{$id} = { ts => $ts }; # original ts, not updated
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
open my $fh, '>', $vc_file or die "Cannot write to $vc_file: $OS_ERROR";
|
open my $fh, '>', $vc_file or die "Cannot write to $vc_file: $OS_ERROR";
|
||||||
foreach my $instance ( sort { $a->{id} cmp $b->{id} } @$instances ) {
|
foreach my $id ( sort keys %all_instances ) {
|
||||||
PTDEBUG && _d('Updated:', Dumper($instance));
|
PTDEBUG && _d('Updated:', $id, Dumper($all_instances{$id}));
|
||||||
print { $fh } $instance->{id} . ',' . $now . "\n";
|
print { $fh } $id . ',' . $all_instances{$id}->{ts} . "\n";
|
||||||
}
|
}
|
||||||
close $fh;
|
close $fh;
|
||||||
|
|
||||||
@@ -1764,7 +1781,7 @@ sub get_instance_id {
|
|||||||
}
|
}
|
||||||
my $id = md5_hex($name);
|
my $id = md5_hex($name);
|
||||||
|
|
||||||
PTDEBUG && _d('MySQL instance:', $id, $name, $dsn);
|
PTDEBUG && _d('MySQL instance:', $id, $name, Dumper($dsn));
|
||||||
|
|
||||||
return $name, $id;
|
return $name, $id;
|
||||||
}
|
}
|
||||||
@@ -3696,9 +3713,9 @@ sub set_dbh {
|
|||||||
|
|
||||||
$dbh->{FetchHashKeyName} = 'NAME_lc' if $self->{NAME_lc};
|
$dbh->{FetchHashKeyName} = 'NAME_lc' if $self->{NAME_lc};
|
||||||
|
|
||||||
my $sql = 'SELECT @@hostname, @@server_id';
|
my $sql = 'SELECT @@server_id /*!50038 , @@hostname*/';
|
||||||
PTDEBUG && _d($dbh, $sql);
|
PTDEBUG && _d($dbh, $sql);
|
||||||
my ($hostname, $server_id) = $dbh->selectrow_array($sql);
|
my ($server_id, $hostname) = $dbh->selectrow_array($sql);
|
||||||
PTDEBUG && _d($dbh, 'hostname:', $hostname, $server_id);
|
PTDEBUG && _d($dbh, 'hostname:', $hostname, $server_id);
|
||||||
if ( $hostname ) {
|
if ( $hostname ) {
|
||||||
$self->{hostname} = $hostname;
|
$self->{hostname} = $hostname;
|
||||||
@@ -3741,6 +3758,32 @@ sub name {
|
|||||||
return $self->{hostname} || $self->{dsn_name} || 'unknown host';
|
return $self->{hostname} || $self->{dsn_name} || 'unknown host';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub remove_duplicate_cxns {
|
||||||
|
my ($self, %args) = @_;
|
||||||
|
my @cxns = @{$args{cxns}};
|
||||||
|
my $seen_ids = $args{seen_ids} || {};
|
||||||
|
PTDEBUG && _d("Removing duplicates from ", join(" ", map { $_->name } @cxns));
|
||||||
|
my @trimmed_cxns;
|
||||||
|
|
||||||
|
for my $cxn ( @cxns ) {
|
||||||
|
my $dbh = $cxn->dbh();
|
||||||
|
my $sql = q{SELECT @@server_id};
|
||||||
|
PTDEBUG && _d($sql);
|
||||||
|
my ($id) = $dbh->selectrow_array($sql);
|
||||||
|
PTDEBUG && _d('Server ID for ', $cxn->name, ': ', $id);
|
||||||
|
|
||||||
|
if ( ! $seen_ids->{$id}++ ) {
|
||||||
|
push @trimmed_cxns, $cxn
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
PTDEBUG && _d("Removing ", $cxn->name,
|
||||||
|
", ID ", $id, ", because we've already seen it");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return \@trimmed_cxns;
|
||||||
|
}
|
||||||
|
|
||||||
sub DESTROY {
|
sub DESTROY {
|
||||||
my ($self) = @_;
|
my ($self) = @_;
|
||||||
|
|
||||||
|
@@ -42,7 +42,52 @@ BEGIN {
|
|||||||
# ###########################################################################
|
# ###########################################################################
|
||||||
{
|
{
|
||||||
package Percona::Toolkit;
|
package Percona::Toolkit;
|
||||||
our $VERSION = '2.2.2';
|
|
||||||
|
our $VERSION = '2.2.3';
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use warnings FATAL => 'all';
|
||||||
|
use English qw(-no_match_vars);
|
||||||
|
use constant PTDEBUG => $ENV{PTDEBUG} || 0;
|
||||||
|
|
||||||
|
use Carp qw(carp cluck);
|
||||||
|
use Data::Dumper qw();
|
||||||
|
|
||||||
|
require Exporter;
|
||||||
|
our @ISA = qw(Exporter);
|
||||||
|
our @EXPORT_OK = qw(
|
||||||
|
have_required_args
|
||||||
|
Dumper
|
||||||
|
_d
|
||||||
|
);
|
||||||
|
|
||||||
|
sub have_required_args {
|
||||||
|
my ($args, @required_args) = @_;
|
||||||
|
my $have_required_args = 1;
|
||||||
|
foreach my $arg ( @required_args ) {
|
||||||
|
if ( !defined $args->{$arg} ) {
|
||||||
|
$have_required_args = 0;
|
||||||
|
carp "Argument $arg is not defined";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
cluck unless $have_required_args; # print backtrace
|
||||||
|
return $have_required_args;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub Dumper {
|
||||||
|
local $Data::Dumper::Indent = 1;
|
||||||
|
local $Data::Dumper::Sortkeys = 1;
|
||||||
|
local $Data::Dumper::Quotekeys = 0;
|
||||||
|
Data::Dumper::Dumper(@_);
|
||||||
|
}
|
||||||
|
|
||||||
|
sub _d {
|
||||||
|
my ($package, undef, $line) = caller 0;
|
||||||
|
@_ = map { (my $temp = $_) =~ s/\n/\n# /g; $temp; }
|
||||||
|
map { defined $_ ? $_ : 'undef' }
|
||||||
|
@_;
|
||||||
|
print STDERR "# $package:$line $PID ", join(' ', @_), "\n";
|
||||||
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
}
|
}
|
||||||
|
@@ -42,7 +42,52 @@ BEGIN {
|
|||||||
# ###########################################################################
|
# ###########################################################################
|
||||||
{
|
{
|
||||||
package Percona::Toolkit;
|
package Percona::Toolkit;
|
||||||
our $VERSION = '2.2.2';
|
|
||||||
|
our $VERSION = '2.2.3';
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use warnings FATAL => 'all';
|
||||||
|
use English qw(-no_match_vars);
|
||||||
|
use constant PTDEBUG => $ENV{PTDEBUG} || 0;
|
||||||
|
|
||||||
|
use Carp qw(carp cluck);
|
||||||
|
use Data::Dumper qw();
|
||||||
|
|
||||||
|
require Exporter;
|
||||||
|
our @ISA = qw(Exporter);
|
||||||
|
our @EXPORT_OK = qw(
|
||||||
|
have_required_args
|
||||||
|
Dumper
|
||||||
|
_d
|
||||||
|
);
|
||||||
|
|
||||||
|
sub have_required_args {
|
||||||
|
my ($args, @required_args) = @_;
|
||||||
|
my $have_required_args = 1;
|
||||||
|
foreach my $arg ( @required_args ) {
|
||||||
|
if ( !defined $args->{$arg} ) {
|
||||||
|
$have_required_args = 0;
|
||||||
|
carp "Argument $arg is not defined";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
cluck unless $have_required_args; # print backtrace
|
||||||
|
return $have_required_args;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub Dumper {
|
||||||
|
local $Data::Dumper::Indent = 1;
|
||||||
|
local $Data::Dumper::Sortkeys = 1;
|
||||||
|
local $Data::Dumper::Quotekeys = 0;
|
||||||
|
Data::Dumper::Dumper(@_);
|
||||||
|
}
|
||||||
|
|
||||||
|
sub _d {
|
||||||
|
my ($package, undef, $line) = caller 0;
|
||||||
|
@_ = map { (my $temp = $_) =~ s/\n/\n# /g; $temp; }
|
||||||
|
map { defined $_ ? $_ : 'undef' }
|
||||||
|
@_;
|
||||||
|
print STDERR "# $package:$line $PID ", join(' ', @_), "\n";
|
||||||
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
}
|
}
|
||||||
|
@@ -41,7 +41,52 @@ BEGIN {
|
|||||||
# ###########################################################################
|
# ###########################################################################
|
||||||
{
|
{
|
||||||
package Percona::Toolkit;
|
package Percona::Toolkit;
|
||||||
our $VERSION = '2.2.2';
|
|
||||||
|
our $VERSION = '2.2.3';
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use warnings FATAL => 'all';
|
||||||
|
use English qw(-no_match_vars);
|
||||||
|
use constant PTDEBUG => $ENV{PTDEBUG} || 0;
|
||||||
|
|
||||||
|
use Carp qw(carp cluck);
|
||||||
|
use Data::Dumper qw();
|
||||||
|
|
||||||
|
require Exporter;
|
||||||
|
our @ISA = qw(Exporter);
|
||||||
|
our @EXPORT_OK = qw(
|
||||||
|
have_required_args
|
||||||
|
Dumper
|
||||||
|
_d
|
||||||
|
);
|
||||||
|
|
||||||
|
sub have_required_args {
|
||||||
|
my ($args, @required_args) = @_;
|
||||||
|
my $have_required_args = 1;
|
||||||
|
foreach my $arg ( @required_args ) {
|
||||||
|
if ( !defined $args->{$arg} ) {
|
||||||
|
$have_required_args = 0;
|
||||||
|
carp "Argument $arg is not defined";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
cluck unless $have_required_args; # print backtrace
|
||||||
|
return $have_required_args;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub Dumper {
|
||||||
|
local $Data::Dumper::Indent = 1;
|
||||||
|
local $Data::Dumper::Sortkeys = 1;
|
||||||
|
local $Data::Dumper::Quotekeys = 0;
|
||||||
|
Data::Dumper::Dumper(@_);
|
||||||
|
}
|
||||||
|
|
||||||
|
sub _d {
|
||||||
|
my ($package, undef, $line) = caller 0;
|
||||||
|
@_ = map { (my $temp = $_) =~ s/\n/\n# /g; $temp; }
|
||||||
|
map { defined $_ ? $_ : 'undef' }
|
||||||
|
@_;
|
||||||
|
print STDERR "# $package:$line $PID ", join(' ', @_), "\n";
|
||||||
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
}
|
}
|
||||||
|
@@ -37,7 +37,52 @@ BEGIN {
|
|||||||
# ###########################################################################
|
# ###########################################################################
|
||||||
{
|
{
|
||||||
package Percona::Toolkit;
|
package Percona::Toolkit;
|
||||||
our $VERSION = '2.2.2';
|
|
||||||
|
our $VERSION = '2.2.3';
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use warnings FATAL => 'all';
|
||||||
|
use English qw(-no_match_vars);
|
||||||
|
use constant PTDEBUG => $ENV{PTDEBUG} || 0;
|
||||||
|
|
||||||
|
use Carp qw(carp cluck);
|
||||||
|
use Data::Dumper qw();
|
||||||
|
|
||||||
|
require Exporter;
|
||||||
|
our @ISA = qw(Exporter);
|
||||||
|
our @EXPORT_OK = qw(
|
||||||
|
have_required_args
|
||||||
|
Dumper
|
||||||
|
_d
|
||||||
|
);
|
||||||
|
|
||||||
|
sub have_required_args {
|
||||||
|
my ($args, @required_args) = @_;
|
||||||
|
my $have_required_args = 1;
|
||||||
|
foreach my $arg ( @required_args ) {
|
||||||
|
if ( !defined $args->{$arg} ) {
|
||||||
|
$have_required_args = 0;
|
||||||
|
carp "Argument $arg is not defined";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
cluck unless $have_required_args; # print backtrace
|
||||||
|
return $have_required_args;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub Dumper {
|
||||||
|
local $Data::Dumper::Indent = 1;
|
||||||
|
local $Data::Dumper::Sortkeys = 1;
|
||||||
|
local $Data::Dumper::Quotekeys = 0;
|
||||||
|
Data::Dumper::Dumper(@_);
|
||||||
|
}
|
||||||
|
|
||||||
|
sub _d {
|
||||||
|
my ($package, undef, $line) = caller 0;
|
||||||
|
@_ = map { (my $temp = $_) =~ s/\n/\n# /g; $temp; }
|
||||||
|
map { defined $_ ? $_ : 'undef' }
|
||||||
|
@_;
|
||||||
|
print STDERR "# $package:$line $PID ", join(' ', @_), "\n";
|
||||||
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
}
|
}
|
||||||
|
@@ -38,7 +38,52 @@ BEGIN {
|
|||||||
# ###########################################################################
|
# ###########################################################################
|
||||||
{
|
{
|
||||||
package Percona::Toolkit;
|
package Percona::Toolkit;
|
||||||
our $VERSION = '2.2.2';
|
|
||||||
|
our $VERSION = '2.2.3';
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use warnings FATAL => 'all';
|
||||||
|
use English qw(-no_match_vars);
|
||||||
|
use constant PTDEBUG => $ENV{PTDEBUG} || 0;
|
||||||
|
|
||||||
|
use Carp qw(carp cluck);
|
||||||
|
use Data::Dumper qw();
|
||||||
|
|
||||||
|
require Exporter;
|
||||||
|
our @ISA = qw(Exporter);
|
||||||
|
our @EXPORT_OK = qw(
|
||||||
|
have_required_args
|
||||||
|
Dumper
|
||||||
|
_d
|
||||||
|
);
|
||||||
|
|
||||||
|
sub have_required_args {
|
||||||
|
my ($args, @required_args) = @_;
|
||||||
|
my $have_required_args = 1;
|
||||||
|
foreach my $arg ( @required_args ) {
|
||||||
|
if ( !defined $args->{$arg} ) {
|
||||||
|
$have_required_args = 0;
|
||||||
|
carp "Argument $arg is not defined";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
cluck unless $have_required_args; # print backtrace
|
||||||
|
return $have_required_args;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub Dumper {
|
||||||
|
local $Data::Dumper::Indent = 1;
|
||||||
|
local $Data::Dumper::Sortkeys = 1;
|
||||||
|
local $Data::Dumper::Quotekeys = 0;
|
||||||
|
Data::Dumper::Dumper(@_);
|
||||||
|
}
|
||||||
|
|
||||||
|
sub _d {
|
||||||
|
my ($package, undef, $line) = caller 0;
|
||||||
|
@_ = map { (my $temp = $_) =~ s/\n/\n# /g; $temp; }
|
||||||
|
map { defined $_ ? $_ : 'undef' }
|
||||||
|
@_;
|
||||||
|
print STDERR "# $package:$line $PID ", join(' ', @_), "\n";
|
||||||
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
}
|
}
|
||||||
|
47
bin/pt-find
47
bin/pt-find
@@ -34,7 +34,52 @@ BEGIN {
|
|||||||
# ###########################################################################
|
# ###########################################################################
|
||||||
{
|
{
|
||||||
package Percona::Toolkit;
|
package Percona::Toolkit;
|
||||||
our $VERSION = '2.2.2';
|
|
||||||
|
our $VERSION = '2.2.3';
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use warnings FATAL => 'all';
|
||||||
|
use English qw(-no_match_vars);
|
||||||
|
use constant PTDEBUG => $ENV{PTDEBUG} || 0;
|
||||||
|
|
||||||
|
use Carp qw(carp cluck);
|
||||||
|
use Data::Dumper qw();
|
||||||
|
|
||||||
|
require Exporter;
|
||||||
|
our @ISA = qw(Exporter);
|
||||||
|
our @EXPORT_OK = qw(
|
||||||
|
have_required_args
|
||||||
|
Dumper
|
||||||
|
_d
|
||||||
|
);
|
||||||
|
|
||||||
|
sub have_required_args {
|
||||||
|
my ($args, @required_args) = @_;
|
||||||
|
my $have_required_args = 1;
|
||||||
|
foreach my $arg ( @required_args ) {
|
||||||
|
if ( !defined $args->{$arg} ) {
|
||||||
|
$have_required_args = 0;
|
||||||
|
carp "Argument $arg is not defined";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
cluck unless $have_required_args; # print backtrace
|
||||||
|
return $have_required_args;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub Dumper {
|
||||||
|
local $Data::Dumper::Indent = 1;
|
||||||
|
local $Data::Dumper::Sortkeys = 1;
|
||||||
|
local $Data::Dumper::Quotekeys = 0;
|
||||||
|
Data::Dumper::Dumper(@_);
|
||||||
|
}
|
||||||
|
|
||||||
|
sub _d {
|
||||||
|
my ($package, undef, $line) = caller 0;
|
||||||
|
@_ = map { (my $temp = $_) =~ s/\n/\n# /g; $temp; }
|
||||||
|
map { defined $_ ? $_ : 'undef' }
|
||||||
|
@_;
|
||||||
|
print STDERR "# $package:$line $PID ", join(' ', @_), "\n";
|
||||||
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
}
|
}
|
||||||
|
@@ -36,7 +36,52 @@ BEGIN {
|
|||||||
# ###########################################################################
|
# ###########################################################################
|
||||||
{
|
{
|
||||||
package Percona::Toolkit;
|
package Percona::Toolkit;
|
||||||
our $VERSION = '2.2.2';
|
|
||||||
|
our $VERSION = '2.2.3';
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use warnings FATAL => 'all';
|
||||||
|
use English qw(-no_match_vars);
|
||||||
|
use constant PTDEBUG => $ENV{PTDEBUG} || 0;
|
||||||
|
|
||||||
|
use Carp qw(carp cluck);
|
||||||
|
use Data::Dumper qw();
|
||||||
|
|
||||||
|
require Exporter;
|
||||||
|
our @ISA = qw(Exporter);
|
||||||
|
our @EXPORT_OK = qw(
|
||||||
|
have_required_args
|
||||||
|
Dumper
|
||||||
|
_d
|
||||||
|
);
|
||||||
|
|
||||||
|
sub have_required_args {
|
||||||
|
my ($args, @required_args) = @_;
|
||||||
|
my $have_required_args = 1;
|
||||||
|
foreach my $arg ( @required_args ) {
|
||||||
|
if ( !defined $args->{$arg} ) {
|
||||||
|
$have_required_args = 0;
|
||||||
|
carp "Argument $arg is not defined";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
cluck unless $have_required_args; # print backtrace
|
||||||
|
return $have_required_args;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub Dumper {
|
||||||
|
local $Data::Dumper::Indent = 1;
|
||||||
|
local $Data::Dumper::Sortkeys = 1;
|
||||||
|
local $Data::Dumper::Quotekeys = 0;
|
||||||
|
Data::Dumper::Dumper(@_);
|
||||||
|
}
|
||||||
|
|
||||||
|
sub _d {
|
||||||
|
my ($package, undef, $line) = caller 0;
|
||||||
|
@_ = map { (my $temp = $_) =~ s/\n/\n# /g; $temp; }
|
||||||
|
map { defined $_ ? $_ : 'undef' }
|
||||||
|
@_;
|
||||||
|
print STDERR "# $package:$line $PID ", join(' ', @_), "\n";
|
||||||
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
}
|
}
|
||||||
|
@@ -37,7 +37,52 @@ BEGIN {
|
|||||||
# ###########################################################################
|
# ###########################################################################
|
||||||
{
|
{
|
||||||
package Percona::Toolkit;
|
package Percona::Toolkit;
|
||||||
our $VERSION = '2.2.2';
|
|
||||||
|
our $VERSION = '2.2.3';
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use warnings FATAL => 'all';
|
||||||
|
use English qw(-no_match_vars);
|
||||||
|
use constant PTDEBUG => $ENV{PTDEBUG} || 0;
|
||||||
|
|
||||||
|
use Carp qw(carp cluck);
|
||||||
|
use Data::Dumper qw();
|
||||||
|
|
||||||
|
require Exporter;
|
||||||
|
our @ISA = qw(Exporter);
|
||||||
|
our @EXPORT_OK = qw(
|
||||||
|
have_required_args
|
||||||
|
Dumper
|
||||||
|
_d
|
||||||
|
);
|
||||||
|
|
||||||
|
sub have_required_args {
|
||||||
|
my ($args, @required_args) = @_;
|
||||||
|
my $have_required_args = 1;
|
||||||
|
foreach my $arg ( @required_args ) {
|
||||||
|
if ( !defined $args->{$arg} ) {
|
||||||
|
$have_required_args = 0;
|
||||||
|
carp "Argument $arg is not defined";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
cluck unless $have_required_args; # print backtrace
|
||||||
|
return $have_required_args;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub Dumper {
|
||||||
|
local $Data::Dumper::Indent = 1;
|
||||||
|
local $Data::Dumper::Sortkeys = 1;
|
||||||
|
local $Data::Dumper::Quotekeys = 0;
|
||||||
|
Data::Dumper::Dumper(@_);
|
||||||
|
}
|
||||||
|
|
||||||
|
sub _d {
|
||||||
|
my ($package, undef, $line) = caller 0;
|
||||||
|
@_ = map { (my $temp = $_) =~ s/\n/\n# /g; $temp; }
|
||||||
|
map { defined $_ ? $_ : 'undef' }
|
||||||
|
@_;
|
||||||
|
print STDERR "# $package:$line $PID ", join(' ', @_), "\n";
|
||||||
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
}
|
}
|
||||||
|
@@ -44,7 +44,52 @@ BEGIN {
|
|||||||
# ###########################################################################
|
# ###########################################################################
|
||||||
{
|
{
|
||||||
package Percona::Toolkit;
|
package Percona::Toolkit;
|
||||||
our $VERSION = '2.2.2';
|
|
||||||
|
our $VERSION = '2.2.3';
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use warnings FATAL => 'all';
|
||||||
|
use English qw(-no_match_vars);
|
||||||
|
use constant PTDEBUG => $ENV{PTDEBUG} || 0;
|
||||||
|
|
||||||
|
use Carp qw(carp cluck);
|
||||||
|
use Data::Dumper qw();
|
||||||
|
|
||||||
|
require Exporter;
|
||||||
|
our @ISA = qw(Exporter);
|
||||||
|
our @EXPORT_OK = qw(
|
||||||
|
have_required_args
|
||||||
|
Dumper
|
||||||
|
_d
|
||||||
|
);
|
||||||
|
|
||||||
|
sub have_required_args {
|
||||||
|
my ($args, @required_args) = @_;
|
||||||
|
my $have_required_args = 1;
|
||||||
|
foreach my $arg ( @required_args ) {
|
||||||
|
if ( !defined $args->{$arg} ) {
|
||||||
|
$have_required_args = 0;
|
||||||
|
carp "Argument $arg is not defined";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
cluck unless $have_required_args; # print backtrace
|
||||||
|
return $have_required_args;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub Dumper {
|
||||||
|
local $Data::Dumper::Indent = 1;
|
||||||
|
local $Data::Dumper::Sortkeys = 1;
|
||||||
|
local $Data::Dumper::Quotekeys = 0;
|
||||||
|
Data::Dumper::Dumper(@_);
|
||||||
|
}
|
||||||
|
|
||||||
|
sub _d {
|
||||||
|
my ($package, undef, $line) = caller 0;
|
||||||
|
@_ = map { (my $temp = $_) =~ s/\n/\n# /g; $temp; }
|
||||||
|
map { defined $_ ? $_ : 'undef' }
|
||||||
|
@_;
|
||||||
|
print STDERR "# $package:$line $PID ", join(' ', @_), "\n";
|
||||||
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
}
|
}
|
||||||
|
47
bin/pt-kill
47
bin/pt-kill
@@ -46,7 +46,52 @@ BEGIN {
|
|||||||
# ###########################################################################
|
# ###########################################################################
|
||||||
{
|
{
|
||||||
package Percona::Toolkit;
|
package Percona::Toolkit;
|
||||||
our $VERSION = '2.2.2';
|
|
||||||
|
our $VERSION = '2.2.3';
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use warnings FATAL => 'all';
|
||||||
|
use English qw(-no_match_vars);
|
||||||
|
use constant PTDEBUG => $ENV{PTDEBUG} || 0;
|
||||||
|
|
||||||
|
use Carp qw(carp cluck);
|
||||||
|
use Data::Dumper qw();
|
||||||
|
|
||||||
|
require Exporter;
|
||||||
|
our @ISA = qw(Exporter);
|
||||||
|
our @EXPORT_OK = qw(
|
||||||
|
have_required_args
|
||||||
|
Dumper
|
||||||
|
_d
|
||||||
|
);
|
||||||
|
|
||||||
|
sub have_required_args {
|
||||||
|
my ($args, @required_args) = @_;
|
||||||
|
my $have_required_args = 1;
|
||||||
|
foreach my $arg ( @required_args ) {
|
||||||
|
if ( !defined $args->{$arg} ) {
|
||||||
|
$have_required_args = 0;
|
||||||
|
carp "Argument $arg is not defined";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
cluck unless $have_required_args; # print backtrace
|
||||||
|
return $have_required_args;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub Dumper {
|
||||||
|
local $Data::Dumper::Indent = 1;
|
||||||
|
local $Data::Dumper::Sortkeys = 1;
|
||||||
|
local $Data::Dumper::Quotekeys = 0;
|
||||||
|
Data::Dumper::Dumper(@_);
|
||||||
|
}
|
||||||
|
|
||||||
|
sub _d {
|
||||||
|
my ($package, undef, $line) = caller 0;
|
||||||
|
@_ = map { (my $temp = $_) =~ s/\n/\n# /g; $temp; }
|
||||||
|
map { defined $_ ? $_ : 'undef' }
|
||||||
|
@_;
|
||||||
|
print STDERR "# $package:$line $PID ", join(' ', @_), "\n";
|
||||||
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
}
|
}
|
||||||
|
@@ -53,7 +53,52 @@ BEGIN {
|
|||||||
# ###########################################################################
|
# ###########################################################################
|
||||||
{
|
{
|
||||||
package Percona::Toolkit;
|
package Percona::Toolkit;
|
||||||
our $VERSION = '2.2.2';
|
|
||||||
|
our $VERSION = '2.2.3';
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use warnings FATAL => 'all';
|
||||||
|
use English qw(-no_match_vars);
|
||||||
|
use constant PTDEBUG => $ENV{PTDEBUG} || 0;
|
||||||
|
|
||||||
|
use Carp qw(carp cluck);
|
||||||
|
use Data::Dumper qw();
|
||||||
|
|
||||||
|
require Exporter;
|
||||||
|
our @ISA = qw(Exporter);
|
||||||
|
our @EXPORT_OK = qw(
|
||||||
|
have_required_args
|
||||||
|
Dumper
|
||||||
|
_d
|
||||||
|
);
|
||||||
|
|
||||||
|
sub have_required_args {
|
||||||
|
my ($args, @required_args) = @_;
|
||||||
|
my $have_required_args = 1;
|
||||||
|
foreach my $arg ( @required_args ) {
|
||||||
|
if ( !defined $args->{$arg} ) {
|
||||||
|
$have_required_args = 0;
|
||||||
|
carp "Argument $arg is not defined";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
cluck unless $have_required_args; # print backtrace
|
||||||
|
return $have_required_args;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub Dumper {
|
||||||
|
local $Data::Dumper::Indent = 1;
|
||||||
|
local $Data::Dumper::Sortkeys = 1;
|
||||||
|
local $Data::Dumper::Quotekeys = 0;
|
||||||
|
Data::Dumper::Dumper(@_);
|
||||||
|
}
|
||||||
|
|
||||||
|
sub _d {
|
||||||
|
my ($package, undef, $line) = caller 0;
|
||||||
|
@_ = map { (my $temp = $_) =~ s/\n/\n# /g; $temp; }
|
||||||
|
map { defined $_ ? $_ : 'undef' }
|
||||||
|
@_;
|
||||||
|
print STDERR "# $package:$line $PID ", join(' ', @_), "\n";
|
||||||
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
}
|
}
|
||||||
|
@@ -63,7 +63,52 @@ BEGIN {
|
|||||||
# ###########################################################################
|
# ###########################################################################
|
||||||
{
|
{
|
||||||
package Percona::Toolkit;
|
package Percona::Toolkit;
|
||||||
our $VERSION = '2.2.2';
|
|
||||||
|
our $VERSION = '2.2.3';
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use warnings FATAL => 'all';
|
||||||
|
use English qw(-no_match_vars);
|
||||||
|
use constant PTDEBUG => $ENV{PTDEBUG} || 0;
|
||||||
|
|
||||||
|
use Carp qw(carp cluck);
|
||||||
|
use Data::Dumper qw();
|
||||||
|
|
||||||
|
require Exporter;
|
||||||
|
our @ISA = qw(Exporter);
|
||||||
|
our @EXPORT_OK = qw(
|
||||||
|
have_required_args
|
||||||
|
Dumper
|
||||||
|
_d
|
||||||
|
);
|
||||||
|
|
||||||
|
sub have_required_args {
|
||||||
|
my ($args, @required_args) = @_;
|
||||||
|
my $have_required_args = 1;
|
||||||
|
foreach my $arg ( @required_args ) {
|
||||||
|
if ( !defined $args->{$arg} ) {
|
||||||
|
$have_required_args = 0;
|
||||||
|
carp "Argument $arg is not defined";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
cluck unless $have_required_args; # print backtrace
|
||||||
|
return $have_required_args;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub Dumper {
|
||||||
|
local $Data::Dumper::Indent = 1;
|
||||||
|
local $Data::Dumper::Sortkeys = 1;
|
||||||
|
local $Data::Dumper::Quotekeys = 0;
|
||||||
|
Data::Dumper::Dumper(@_);
|
||||||
|
}
|
||||||
|
|
||||||
|
sub _d {
|
||||||
|
my ($package, undef, $line) = caller 0;
|
||||||
|
@_ = map { (my $temp = $_) =~ s/\n/\n# /g; $temp; }
|
||||||
|
map { defined $_ ? $_ : 'undef' }
|
||||||
|
@_;
|
||||||
|
print STDERR "# $package:$line $PID ", join(' ', @_), "\n";
|
||||||
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
}
|
}
|
||||||
|
@@ -39,7 +39,52 @@ BEGIN {
|
|||||||
# ###########################################################################
|
# ###########################################################################
|
||||||
{
|
{
|
||||||
package Percona::Toolkit;
|
package Percona::Toolkit;
|
||||||
our $VERSION = '2.2.2';
|
|
||||||
|
our $VERSION = '2.2.3';
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use warnings FATAL => 'all';
|
||||||
|
use English qw(-no_match_vars);
|
||||||
|
use constant PTDEBUG => $ENV{PTDEBUG} || 0;
|
||||||
|
|
||||||
|
use Carp qw(carp cluck);
|
||||||
|
use Data::Dumper qw();
|
||||||
|
|
||||||
|
require Exporter;
|
||||||
|
our @ISA = qw(Exporter);
|
||||||
|
our @EXPORT_OK = qw(
|
||||||
|
have_required_args
|
||||||
|
Dumper
|
||||||
|
_d
|
||||||
|
);
|
||||||
|
|
||||||
|
sub have_required_args {
|
||||||
|
my ($args, @required_args) = @_;
|
||||||
|
my $have_required_args = 1;
|
||||||
|
foreach my $arg ( @required_args ) {
|
||||||
|
if ( !defined $args->{$arg} ) {
|
||||||
|
$have_required_args = 0;
|
||||||
|
carp "Argument $arg is not defined";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
cluck unless $have_required_args; # print backtrace
|
||||||
|
return $have_required_args;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub Dumper {
|
||||||
|
local $Data::Dumper::Indent = 1;
|
||||||
|
local $Data::Dumper::Sortkeys = 1;
|
||||||
|
local $Data::Dumper::Quotekeys = 0;
|
||||||
|
Data::Dumper::Dumper(@_);
|
||||||
|
}
|
||||||
|
|
||||||
|
sub _d {
|
||||||
|
my ($package, undef, $line) = caller 0;
|
||||||
|
@_ = map { (my $temp = $_) =~ s/\n/\n# /g; $temp; }
|
||||||
|
map { defined $_ ? $_ : 'undef' }
|
||||||
|
@_;
|
||||||
|
print STDERR "# $package:$line $PID ", join(' ', @_), "\n";
|
||||||
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
}
|
}
|
||||||
|
@@ -40,7 +40,52 @@ BEGIN {
|
|||||||
# ###########################################################################
|
# ###########################################################################
|
||||||
{
|
{
|
||||||
package Percona::Toolkit;
|
package Percona::Toolkit;
|
||||||
our $VERSION = '2.2.2';
|
|
||||||
|
our $VERSION = '2.2.3';
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use warnings FATAL => 'all';
|
||||||
|
use English qw(-no_match_vars);
|
||||||
|
use constant PTDEBUG => $ENV{PTDEBUG} || 0;
|
||||||
|
|
||||||
|
use Carp qw(carp cluck);
|
||||||
|
use Data::Dumper qw();
|
||||||
|
|
||||||
|
require Exporter;
|
||||||
|
our @ISA = qw(Exporter);
|
||||||
|
our @EXPORT_OK = qw(
|
||||||
|
have_required_args
|
||||||
|
Dumper
|
||||||
|
_d
|
||||||
|
);
|
||||||
|
|
||||||
|
sub have_required_args {
|
||||||
|
my ($args, @required_args) = @_;
|
||||||
|
my $have_required_args = 1;
|
||||||
|
foreach my $arg ( @required_args ) {
|
||||||
|
if ( !defined $args->{$arg} ) {
|
||||||
|
$have_required_args = 0;
|
||||||
|
carp "Argument $arg is not defined";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
cluck unless $have_required_args; # print backtrace
|
||||||
|
return $have_required_args;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub Dumper {
|
||||||
|
local $Data::Dumper::Indent = 1;
|
||||||
|
local $Data::Dumper::Sortkeys = 1;
|
||||||
|
local $Data::Dumper::Quotekeys = 0;
|
||||||
|
Data::Dumper::Dumper(@_);
|
||||||
|
}
|
||||||
|
|
||||||
|
sub _d {
|
||||||
|
my ($package, undef, $line) = caller 0;
|
||||||
|
@_ = map { (my $temp = $_) =~ s/\n/\n# /g; $temp; }
|
||||||
|
map { defined $_ ? $_ : 'undef' }
|
||||||
|
@_;
|
||||||
|
print STDERR "# $package:$line $PID ", join(' ', @_), "\n";
|
||||||
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
}
|
}
|
||||||
|
@@ -56,7 +56,52 @@ BEGIN {
|
|||||||
# ###########################################################################
|
# ###########################################################################
|
||||||
{
|
{
|
||||||
package Percona::Toolkit;
|
package Percona::Toolkit;
|
||||||
our $VERSION = '2.2.2';
|
|
||||||
|
our $VERSION = '2.2.3';
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use warnings FATAL => 'all';
|
||||||
|
use English qw(-no_match_vars);
|
||||||
|
use constant PTDEBUG => $ENV{PTDEBUG} || 0;
|
||||||
|
|
||||||
|
use Carp qw(carp cluck);
|
||||||
|
use Data::Dumper qw();
|
||||||
|
|
||||||
|
require Exporter;
|
||||||
|
our @ISA = qw(Exporter);
|
||||||
|
our @EXPORT_OK = qw(
|
||||||
|
have_required_args
|
||||||
|
Dumper
|
||||||
|
_d
|
||||||
|
);
|
||||||
|
|
||||||
|
sub have_required_args {
|
||||||
|
my ($args, @required_args) = @_;
|
||||||
|
my $have_required_args = 1;
|
||||||
|
foreach my $arg ( @required_args ) {
|
||||||
|
if ( !defined $args->{$arg} ) {
|
||||||
|
$have_required_args = 0;
|
||||||
|
carp "Argument $arg is not defined";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
cluck unless $have_required_args; # print backtrace
|
||||||
|
return $have_required_args;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub Dumper {
|
||||||
|
local $Data::Dumper::Indent = 1;
|
||||||
|
local $Data::Dumper::Sortkeys = 1;
|
||||||
|
local $Data::Dumper::Quotekeys = 0;
|
||||||
|
Data::Dumper::Dumper(@_);
|
||||||
|
}
|
||||||
|
|
||||||
|
sub _d {
|
||||||
|
my ($package, undef, $line) = caller 0;
|
||||||
|
@_ = map { (my $temp = $_) =~ s/\n/\n# /g; $temp; }
|
||||||
|
map { defined $_ ? $_ : 'undef' }
|
||||||
|
@_;
|
||||||
|
print STDERR "# $package:$line $PID ", join(' ', @_), "\n";
|
||||||
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
}
|
}
|
||||||
|
@@ -54,7 +54,52 @@ BEGIN {
|
|||||||
# ###########################################################################
|
# ###########################################################################
|
||||||
{
|
{
|
||||||
package Percona::Toolkit;
|
package Percona::Toolkit;
|
||||||
our $VERSION = '2.2.2';
|
|
||||||
|
our $VERSION = '2.2.3';
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use warnings FATAL => 'all';
|
||||||
|
use English qw(-no_match_vars);
|
||||||
|
use constant PTDEBUG => $ENV{PTDEBUG} || 0;
|
||||||
|
|
||||||
|
use Carp qw(carp cluck);
|
||||||
|
use Data::Dumper qw();
|
||||||
|
|
||||||
|
require Exporter;
|
||||||
|
our @ISA = qw(Exporter);
|
||||||
|
our @EXPORT_OK = qw(
|
||||||
|
have_required_args
|
||||||
|
Dumper
|
||||||
|
_d
|
||||||
|
);
|
||||||
|
|
||||||
|
sub have_required_args {
|
||||||
|
my ($args, @required_args) = @_;
|
||||||
|
my $have_required_args = 1;
|
||||||
|
foreach my $arg ( @required_args ) {
|
||||||
|
if ( !defined $args->{$arg} ) {
|
||||||
|
$have_required_args = 0;
|
||||||
|
carp "Argument $arg is not defined";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
cluck unless $have_required_args; # print backtrace
|
||||||
|
return $have_required_args;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub Dumper {
|
||||||
|
local $Data::Dumper::Indent = 1;
|
||||||
|
local $Data::Dumper::Sortkeys = 1;
|
||||||
|
local $Data::Dumper::Quotekeys = 0;
|
||||||
|
Data::Dumper::Dumper(@_);
|
||||||
|
}
|
||||||
|
|
||||||
|
sub _d {
|
||||||
|
my ($package, undef, $line) = caller 0;
|
||||||
|
@_ = map { (my $temp = $_) =~ s/\n/\n# /g; $temp; }
|
||||||
|
map { defined $_ ? $_ : 'undef' }
|
||||||
|
@_;
|
||||||
|
print STDERR "# $package:$line $PID ", join(' ', @_), "\n";
|
||||||
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
}
|
}
|
||||||
|
@@ -60,7 +60,52 @@ BEGIN {
|
|||||||
# ###########################################################################
|
# ###########################################################################
|
||||||
{
|
{
|
||||||
package Percona::Toolkit;
|
package Percona::Toolkit;
|
||||||
our $VERSION = '2.2.2';
|
|
||||||
|
our $VERSION = '2.2.3';
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use warnings FATAL => 'all';
|
||||||
|
use English qw(-no_match_vars);
|
||||||
|
use constant PTDEBUG => $ENV{PTDEBUG} || 0;
|
||||||
|
|
||||||
|
use Carp qw(carp cluck);
|
||||||
|
use Data::Dumper qw();
|
||||||
|
|
||||||
|
require Exporter;
|
||||||
|
our @ISA = qw(Exporter);
|
||||||
|
our @EXPORT_OK = qw(
|
||||||
|
have_required_args
|
||||||
|
Dumper
|
||||||
|
_d
|
||||||
|
);
|
||||||
|
|
||||||
|
sub have_required_args {
|
||||||
|
my ($args, @required_args) = @_;
|
||||||
|
my $have_required_args = 1;
|
||||||
|
foreach my $arg ( @required_args ) {
|
||||||
|
if ( !defined $args->{$arg} ) {
|
||||||
|
$have_required_args = 0;
|
||||||
|
carp "Argument $arg is not defined";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
cluck unless $have_required_args; # print backtrace
|
||||||
|
return $have_required_args;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub Dumper {
|
||||||
|
local $Data::Dumper::Indent = 1;
|
||||||
|
local $Data::Dumper::Sortkeys = 1;
|
||||||
|
local $Data::Dumper::Quotekeys = 0;
|
||||||
|
Data::Dumper::Dumper(@_);
|
||||||
|
}
|
||||||
|
|
||||||
|
sub _d {
|
||||||
|
my ($package, undef, $line) = caller 0;
|
||||||
|
@_ = map { (my $temp = $_) =~ s/\n/\n# /g; $temp; }
|
||||||
|
map { defined $_ ? $_ : 'undef' }
|
||||||
|
@_;
|
||||||
|
print STDERR "# $package:$line $PID ", join(' ', @_), "\n";
|
||||||
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
}
|
}
|
||||||
|
@@ -43,7 +43,52 @@ BEGIN {
|
|||||||
# ###########################################################################
|
# ###########################################################################
|
||||||
{
|
{
|
||||||
package Percona::Toolkit;
|
package Percona::Toolkit;
|
||||||
our $VERSION = '2.2.2';
|
|
||||||
|
our $VERSION = '2.2.3';
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use warnings FATAL => 'all';
|
||||||
|
use English qw(-no_match_vars);
|
||||||
|
use constant PTDEBUG => $ENV{PTDEBUG} || 0;
|
||||||
|
|
||||||
|
use Carp qw(carp cluck);
|
||||||
|
use Data::Dumper qw();
|
||||||
|
|
||||||
|
require Exporter;
|
||||||
|
our @ISA = qw(Exporter);
|
||||||
|
our @EXPORT_OK = qw(
|
||||||
|
have_required_args
|
||||||
|
Dumper
|
||||||
|
_d
|
||||||
|
);
|
||||||
|
|
||||||
|
sub have_required_args {
|
||||||
|
my ($args, @required_args) = @_;
|
||||||
|
my $have_required_args = 1;
|
||||||
|
foreach my $arg ( @required_args ) {
|
||||||
|
if ( !defined $args->{$arg} ) {
|
||||||
|
$have_required_args = 0;
|
||||||
|
carp "Argument $arg is not defined";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
cluck unless $have_required_args; # print backtrace
|
||||||
|
return $have_required_args;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub Dumper {
|
||||||
|
local $Data::Dumper::Indent = 1;
|
||||||
|
local $Data::Dumper::Sortkeys = 1;
|
||||||
|
local $Data::Dumper::Quotekeys = 0;
|
||||||
|
Data::Dumper::Dumper(@_);
|
||||||
|
}
|
||||||
|
|
||||||
|
sub _d {
|
||||||
|
my ($package, undef, $line) = caller 0;
|
||||||
|
@_ = map { (my $temp = $_) =~ s/\n/\n# /g; $temp; }
|
||||||
|
map { defined $_ ? $_ : 'undef' }
|
||||||
|
@_;
|
||||||
|
print STDERR "# $package:$line $PID ", join(' ', @_), "\n";
|
||||||
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user