From: Gurusamy Sarathy Date: Mon, 31 Jan 2000 04:17:09 +0000 (+0000) Subject: remove caller.pm from change#3534 (flawed idea) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8004f2ac219abdd8660c02a4a46ed97695dc379d;p=p5sagit%2Fp5-mst-13.2.git remove caller.pm from change#3534 (flawed idea) p4raw-link: @3534 on //depot/perl: f3aa04c29a85dd63d563ae8e27316ff34501ccd5 p4raw-id: //depot/perl@4929 --- diff --git a/MANIFEST b/MANIFEST index 1b3615f..7d248e5 100644 --- a/MANIFEST +++ b/MANIFEST @@ -678,7 +678,6 @@ lib/blib.pm For "use blib" lib/byte.pm Pragma to enable byte operations lib/byte_heavy.pl Support routines for byte pragma lib/cacheout.pl Manages output filehandles when you need too many -lib/caller.pm Inherit pragmatic attributes from caller's context lib/charnames.pm Character names lib/chat2.pl Obsolete ipc library (use Comm.pm etc instead) lib/complete.pl A command completion subroutine diff --git a/lib/caller.pm b/lib/caller.pm deleted file mode 100644 index 98d4f3f..0000000 --- a/lib/caller.pm +++ /dev/null @@ -1,58 +0,0 @@ -package caller; -our $VERSION = "1.0"; - -=head1 NAME - -caller - inherit pragmatic attributes from the context of the caller - -=head1 SYNOPSIS - - use caller qw(encoding); - -=head1 DESCRIPTION - -This pragma allows a module to inherit some attributes from the -context which loaded it. - -Inheriting attributes takes place at compile time; this means -only attributes that are visible in the calling context at compile -time will be propagated. - -Currently, the only supported attribute is C. - -=over - -=item encoding - -Indicates that the character set encoding of the caller's context -must be inherited. This can be used to inherit the C -setting in the calling context. - -=back - -=cut - -my %bitmask = ( - # only HINT_UTF8 supported for now - encoding => 0x8 -); - -sub bits { - my $bits = 0; - for my $s (@_) { $bits |= $bitmask{$s} || 0; }; - $bits; -} - -sub import { - shift; - my @cxt = caller(3); - if (@cxt and $cxt[7]) { # was our parent require-d? - $^H |= bits(@_) & $cxt[8]; - } -} - -sub unimport { - # noop currently -} - -1; diff --git a/pod/perldelta.pod b/pod/perldelta.pod index efa1a2f..cba167f 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -1184,7 +1184,7 @@ token; if not, the DATA filehandle will be left open in binary mode. Earlier versions always opened the DATA filehandle in text mode. The glob() operator is implemented via the L extension, -which supports glob syntax of the C. This increases the flexibility +which supports glob syntax of the C shell. This increases the flexibility of the glob() operator, but there may be compatibility issues for programs that relied on the older globbing syntax. If you want to preserve compatibility with the older syntax, you might want to put @@ -1587,10 +1587,6 @@ syntax. See L and L. C to enable UTF-8 and Unicode support. -C allows modules to inherit pragmatic attributes -from the caller's context. C is currently the only supported -attribute. - Lexical warnings pragma, C, to control optional warnings. See L. diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index a72645a..e40b31b 100644 --- a/pod/perlfunc.pod +++ b/pod/perlfunc.pod @@ -523,8 +523,8 @@ C statement. In particular, for a C statement, $filename is C<(eval)>, but $evaltext is undefined. (Note also that each C statement creates a C frame inside an C) frame. C<$hints> contains pragmatic hints that the caller was -compiled with. It currently only reflects the hint corresponding to -C. +compiled with. The C<$hints> value is subject to change between versions +of Perl, and is not meant for external use. Furthermore, when called from within the DB package, caller returns more detailed information: it sets the list variable C<@DB::args> to be the