package ok;
-use strict;
-use warnings;
-
-use Test::More 1.301001 ();
-use Carp qw/croak/;
+$ok::VERSION = '1.302059';
-our $VERSION = '1.301001_040';
-$VERSION = eval $VERSION; ## no critic (BuiltinFunctions::ProhibitStringyEval)
+use strict;
+use Test::More ();
sub import {
shift;
if (@_) {
- croak "'use ok' called with an empty argument, did you try to use a package name from an uninitialized variable?"
- unless defined $_[0];
-
goto &Test::More::pass if $_[0] eq 'ok';
goto &Test::More::use_ok;
}
+
+ # No argument list - croak as if we are prototyped like use_ok()
+ my (undef, $file, $line) = caller();
+ ($file =~ /^\(eval/) or die "Not enough arguments for 'use ok' at $file line $line\n";
}
-1;
__END__
-=encoding utf8
+=encoding UTF-8
=head1 NAME
Please see L<Test::use::ok> for the full description.
-=head1 MAINTAINERS
-
-=over 4
-
-=item Chad Granum E<lt>exodist@cpan.orgE<gt>
-
-=back
-
=head1 CC0 1.0 Universal
To the extent possible under law, 唐鳳 has waived all copyright and related