/usr/lib/perl/5.18.2/Scalar/Util.pm is in perl-base 5.18.2-2ubuntu1.
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 | # Scalar::Util.pm
#
# Copyright (c) 1997-2007 Graham Barr <gbarr@pobox.com>. All rights reserved.
# This program is free software; you can redistribute it and/or
# modify it under the same terms as Perl itself.
package Scalar::Util;
use strict;
require Exporter;
require List::Util; # List::Util loads the XS
our @ISA = qw(Exporter);
our @EXPORT_OK = qw(
blessed
dualvar
isdual
isvstring
isweak
looks_like_number
openhandle
readonly
refaddr
reftype
set_prototype
tainted
weaken
);
our $VERSION = "1.27";
$VERSION = eval $VERSION;
our @EXPORT_FAIL;
unless (defined &weaken) {
push @EXPORT_FAIL, qw(weaken);
}
unless (defined &isweak) {
push @EXPORT_FAIL, qw(isweak isvstring);
}
unless (defined &isvstring) {
push @EXPORT_FAIL, qw(isvstring);
}
sub export_fail {
if (grep { /^(?:weaken|isweak)$/ } @_ ) {
require Carp;
Carp::croak("Weak references are not implemented in the version of perl");
}
if (grep { /^isvstring$/ } @_ ) {
require Carp;
Carp::croak("Vstrings are not implemented in the version of perl");
}
@_;
}
1;
__END__
|