=cut
+use Scalar::Util ();
+
use base qw<Test::Valgrind::Tool>;
=head1 METHODS
my %args = @_;
- my $callers = delete $args{callers} || 50;
- $callers =~ s/\D//g;
+ my $callers = delete $args{callers};
+ $callers = 24 unless $callers;
+ die 'Invalid number of callers'
+ unless Scalar::Util::looks_like_number($callers) and $callers > 0
+ and $callers <= 24;
my $self = bless $class->Test::Valgrind::Tool::new(%args), $class;
$self;
}
-sub new_trainer { shift->new(callers => 50) }
+sub new_trainer { shift->new(callers => 24) }
=head2 C<callers>