diff options
| author | Manuel Traut <manut@mecka.net> | 2011-07-18 14:00:12 +0200 |
|---|---|---|
| committer | Manuel Traut <manut@mecka.net> | 2011-07-18 14:00:12 +0200 |
| commit | ed006a8eb44831189e152826c692330d0a0cfe3b (patch) | |
| tree | 66996c44c68a8787e4a35a85aea683975f307767 /beagle/debian-rfs/usr/lib/perl/5.10.1/Scalar/Util.pm | |
| parent | 4493e8f707e62b9867d9cfd40205115140e7c993 (diff) | |
delete beagle-dir
Signed-off-by: Manuel Traut <manut@mecka.net>
Diffstat (limited to 'beagle/debian-rfs/usr/lib/perl/5.10.1/Scalar/Util.pm')
| -rw-r--r-- | beagle/debian-rfs/usr/lib/perl/5.10.1/Scalar/Util.pm | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/beagle/debian-rfs/usr/lib/perl/5.10.1/Scalar/Util.pm b/beagle/debian-rfs/usr/lib/perl/5.10.1/Scalar/Util.pm deleted file mode 100644 index 6c005bb..0000000 --- a/beagle/debian-rfs/usr/lib/perl/5.10.1/Scalar/Util.pm +++ /dev/null @@ -1,69 +0,0 @@ -# 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; -use vars qw(@ISA @EXPORT_OK $VERSION @EXPORT_FAIL); -require Exporter; -require List::Util; # List::Util loads the XS - -@ISA = qw(Exporter); -@EXPORT_OK = qw(blessed dualvar reftype weaken isweak tainted readonly openhandle refaddr isvstring looks_like_number set_prototype); -$VERSION = "1.21"; -$VERSION = eval $VERSION; - -unless (defined &dualvar) { - # Load Pure Perl version if XS not loaded - require Scalar::Util::PP; - Scalar::Util::PP->import; - push @EXPORT_FAIL, qw(weaken isweak dualvar isvstring set_prototype); -} - -sub export_fail { - if (grep { /dualvar/ } @EXPORT_FAIL) { # no XS loaded - my $pat = join("|", @EXPORT_FAIL); - if (my ($err) = grep { /^($pat)$/ } @_ ) { - require Carp; - Carp::croak("$err is only available with the XS version of Scalar::Util"); - } - } - - 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"); - } - - @_; -} - -sub openhandle ($) { - my $fh = shift; - my $rt = reftype($fh) || ''; - - return defined(fileno($fh)) ? $fh : undef - if $rt eq 'IO'; - - if (reftype(\$fh) eq 'GLOB') { # handle openhandle(*DATA) - $fh = \(my $tmp=$fh); - } - elsif ($rt ne 'GLOB') { - return undef; - } - - (tied(*$fh) or defined(fileno($fh))) - ? $fh : undef; -} - -1; - -__END__ - |
