6 caller - inherit pragmatic attributes from the context of the caller
10 use caller qw(encoding);
14 This pragma allows a module to inherit some attributes from the
15 context which loaded it.
17 Inheriting attributes takes place at compile time; this means
18 only attributes that are visible in the calling context at compile
19 time will be propagated.
21 Currently, the only supported attribute is C<encoding>.
27 Indicates that the character set encoding of the caller's context
28 must be inherited. This can be used to inherit the C<use utf8>
29 setting in the calling context.
36 # only HINT_UTF8 supported for now
42 for my $s (@_) { $bits |= $bitmask{$s} || 0; };
49 if (@cxt and $cxt[7]) { # was our parent require-d?
50 $^H |= bits(@_) & $cxt[8];