use constant MIN_IPC_SYS_SIMPLE_VER => 0.12;
# All the Fatal/autodie modules share the same version number.
-our $VERSION = '1.997';
+our $VERSION = '1.998';
our $Debug ||= 0;
':1.995' => [qw(:default)],
':1.996' => [qw(:default)],
':1.997' => [qw(:default)],
+ ':1.998' => [qw(:default)],
);
makes it a scalar context, except when the C<:void> tag is used.
This problem does not exist in L<autodie>.
+"Used only once" warnings can be generated when C<autodie> or C<Fatal>
+is used with package filehandles (eg, C<FILE>). It's strongly recommended
+you use scalar filehandles instead.
+
=head1 AUTHOR
Original module by Lionel Cons (CERN).
use IO::Handle;
my $tmpfh = tempfile();
+my $truncate_status;
eval {
- truncate($tmpfh, 0);
+ $truncate_status = truncate($tmpfh, 0);
};
-if ($@) {
- plan skip_all => 'Truncate not implemented on this system';
+if ($@ || !defined($truncate_status)) {
+ plan skip_all => 'Truncate not implemented or not working on this system';
}
plan tests => 3;