summaryrefslogtreecommitdiff
path: root/Master/tlpkg/tlperl/lib/Attribute/Handlers.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Master/tlpkg/tlperl/lib/Attribute/Handlers.pm')
-rw-r--r--Master/tlpkg/tlperl/lib/Attribute/Handlers.pm18
1 files changed, 9 insertions, 9 deletions
diff --git a/Master/tlpkg/tlperl/lib/Attribute/Handlers.pm b/Master/tlpkg/tlperl/lib/Attribute/Handlers.pm
index 36f6e2e81c9..60ee32a59c0 100644
--- a/Master/tlpkg/tlperl/lib/Attribute/Handlers.pm
+++ b/Master/tlpkg/tlperl/lib/Attribute/Handlers.pm
@@ -4,7 +4,7 @@ use Carp;
use warnings;
use strict;
use vars qw($VERSION $AUTOLOAD);
-$VERSION = '0.93'; # remember to update version in POD!
+$VERSION = '0.94'; # remember to update version in POD!
# $DB::single=1;
my %symcache;
@@ -366,7 +366,7 @@ Thereafter, any subroutine declared with a C<:Loud> attribute in the class
LoudDecl:
package LoudDecl;
-
+
sub foo: Loud {...}
causes the above handler to be invoked, and passed:
@@ -581,7 +581,7 @@ variables. For example:
use Attribute::Handlers;
use Tie::Cycle;
-
+
sub UNIVERSAL::Cycle : ATTR(SCALAR) {
my ($package, $symbol, $referent, $attr, $data, $phase) = @_;
$data = [ $data ] unless ref $data eq 'ARRAY';
@@ -591,9 +591,9 @@ variables. For example:
# and thereafter...
package main;
-
+
my $next : Cycle('A'..'Z'); # $next is now a tied variable
-
+
while (<>) {
print $next;
}
@@ -655,7 +655,7 @@ If the attribute name is unqualified, the attribute is installed in the
current package. Otherwise it is installed in the qualifier's package:
package Here;
-
+
use Attribute::Handlers autotie => {
Other::Good => Tie::SecureHash, # tie attr installed in Other::
Bad => Tie::Taxes, # tie attr installed in Here::
@@ -668,7 +668,7 @@ facilitate this, Attribute::Handlers recognizes a special "pseudo-class" --
C<__CALLER__>, which may be specified as the qualifier of an attribute:
package Tie::Me::Kangaroo:Down::Sport;
-
+
use Attribute::Handlers autotie =>
{ '__CALLER__::Roo' => __PACKAGE__ };
@@ -792,7 +792,7 @@ would cause the following handlers to be invoked:
# my %hsh :Good(q/bye) :Omni(q/bus/);
-
+
MyClass::Good:ATTR(HASH)( 'SomeOtherClass', # class
'LEXICAL', # no typeglob
\%hsh, # referent
@@ -800,7 +800,7 @@ would cause the following handlers to be invoked:
'q/bye' # raw attr data
'CHECK', # compiler phase
);
-
+
MyClass::Omni:ATTR(HASH)( 'SomeOtherClass', # class
'LEXICAL', # no typeglob
\%hsh, # referent