/usr/share/perl5/Test/Unit/Assertion/Boolean.pm is in libtest-unit-perl 0.25-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | package Test::Unit::Assertion::Boolean;
use strict;
# adding this fixes the 'Can't locate object method "fail" via package
# "Test::Unit::Assertion::Boolean"' problem under perl 5.005 - Christian
use Test::Unit::Assertion;
use Test::Unit::Failure;
use base 'Test::Unit::Assertion';
use overload 'bool' => sub {$ {$_[0]}};
sub new {
my $class = shift;
my $bool = shift;
my $self = \$bool;
bless $self, $class;
}
sub do_assertion {
my $self = shift;
$$self or $self->fail( @_ ? join('', @_) : "Boolean assertion failed");
}
sub to_string {
my $self = shift;
($$self ? 'TRUE' : 'FALSE') . ' boolean assertion';
}
1;
__END__
=head1 NAME
Test::Unit::Assertion::Boolean - A boolean assertion
=head1 SYNOPSIS
Pay no attention to the man behind the curtain. This is simply a
boolean assertion that exists solely to rationalize the way
Test::Unit::Assert::assert does its thing. You should never have to
instantiate one of these directly. Ever. Go away. There's nothing to
see here.
=head1 AUTHOR
Copyright (c) 2001 Piers Cawley E<lt>pdcawley@iterative-software.comE<gt>.
All rights reserved. This program is free software; you can
redistribute it and/or modify it under the same terms as Perl itself.
=head1 SEE ALSO
Look, I've told you, there's nothing going on here. If you go looking
at the listing of this module you'll see that it does almost nothing.
Why on earth you're still reading at this point is something of a
mystery to me. After all, if you're hacking on the Test::Unit source
code you'll be able to use the Source.
|