diff options
Diffstat (limited to 'lib/Attribute/Handlers')
-rw-r--r-- | lib/Attribute/Handlers/Changes | 46 | ||||
-rw-r--r-- | lib/Attribute/Handlers/README | 68 |
2 files changed, 114 insertions, 0 deletions
diff --git a/lib/Attribute/Handlers/Changes b/lib/Attribute/Handlers/Changes new file mode 100644 index 0000000000..9aa870eb44 --- /dev/null +++ b/lib/Attribute/Handlers/Changes @@ -0,0 +1,46 @@ +Revision history for Perl extension Attribute::Handlers + +0.50 Sat Apr 21 16:09:31 2001 + - original version; + +0.51 Tue May 1 06:33:15 2001 + + - Fixed fatal file path error in MANIFEST (thanks Marcel and Jost) + + +0.60 Thu May 10 15:46:02 2001 + + - Added RAWDATA specifier + + - Cleaned up documentation (thanks Garrett) + + - Added warning for all-lowercase handlers (thanks Garrett) + + - Added autotie functionality + + - Tweaked handling of anon arrays as attribute args + + +0.61 Thu May 10 16:28:06 2001 + + - Critical doc patch + + +0.65 Sun Jun 3 07:40:03 2001 + + - Added __CALLER__ pseudo class for 'autotie' + + - Added multi-phasic attribute handlers (thanks Garrett) + + - Fixed nasty $SIG{__WARN__}-induced bug + + - Cached ref/symbol mapping for better performance and more + reliable symbol identification under evil typeglob manipulations + + - Added option to pass arguments when autotied classes are imported + (thanks Marcel) + + - Fixed bug in handling of lexical SCALAR refs + + - Cleaned up interactions with other class hierarchies + (due to being base class of UNIVERSAL) diff --git a/lib/Attribute/Handlers/README b/lib/Attribute/Handlers/README new file mode 100644 index 0000000000..2de8de9f3f --- /dev/null +++ b/lib/Attribute/Handlers/README @@ -0,0 +1,68 @@ +============================================================================== + Release of version 0.70 of Attribute::Handlers +============================================================================== + + +NAME + Attribute::Handlers - Simpler definition of attribute handlers + +DESCRIPTION + This module, when inherited by a package, allows that package's class to + define attribute handler subroutines for specific attributes. Variables + and subroutines subsequently defined in that package, or in packages + derived from that package may be given attributes with the same names as + the attribute handler subroutines, which will then be called at the end + of the compilation phase (i.e. in a `CHECK' block). + +EXAMPLE + + package UNIVERSAL; + use Attribute::Handlers; + + my %name; + sub name { return $name{$_[2]}||*{$_[1]}{NAME} } + + sub Name :ATTR { $name{$_[2]} = $_[4] } + + sub Purpose :ATTR { print STDERR "Purpose of ", &name, " is $_[4]\n" } + + sub Unit :ATTR { print STDERR &name, " measured in $_[4]\n" } + + + package main; + + my $capacity : Name(capacity) + : Purpose(to store max storage capacity for files) + : Unit(Gb); + + package Other; + + sub foo : Purpose(to foo all data before barring it) { } + + +AUTHOR + Damian Conway (damian@conway.org) + +COPYRIGHT + Copyright (c) 2001, Damian Conway. All Rights Reserved. + This module is free software. It may be used, redistributed + and/or modified under the terms of the Perl Artistic License + (see http://www.perl.com/perl/misc/Artistic.html) + + +============================================================================== + +CHANGES IN VERSION 0.70 + +(No changes have been documented for this version) + +============================================================================== + +AVAILABILITY + +Attribute::Handlers has been uploaded to the CPAN +and is also available from: + + http://www.csse.monash.edu.au/~damian/CPAN/Attribute-Handlers.tar.gz + +============================================================================== |