| Attribute-Util documentation | Contained in the Attribute-Util distribution. |
Attribute::Util - Assorted general utility attributes
# makes all attributes available use Attribute::Util; # or you can load individual attributes use Attribute::Util qw(Memoize SigHandler);
When used without argument, this module provides four universally accessible attributes of general interest as follows:
See Attribute::Abstract.
See Attribute::Alias.
See Attribute::Memoize.
See Attribute::Method.
When used with arguments, this module acts as an attributes loader.
use Attribute::Util qw/Memoize SigHandler/;
Is exactly the same as
use Attribute::Memoize; use Attribute::SigHandler;
Theoretically, you can load any other attribute handlers so long as it is named Attribute::AnyThing.
None known so far. If you find any bugs or oddities, please do inform the author.
Marcel Grunauer, <marcel@codewerk.com>
Dan Kogai, <dankogai@dan.co.jp>
Copyright 2001 Marcel Grunauer. All rights reserved.
Copyright 2006 Dan Kogai. All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl(1), Attribute::Handlers
| Attribute-Util documentation | Contained in the Attribute-Util distribution. |
package Attribute::Util; use warnings; use strict; use Attribute::Handlers; use Carp (); our $VERSION = sprintf "%d.%02d", q$Revision: 1.6 $ =~ /(\d+)/g; our @DEFAULT_ATTRIBUTES = qw(Abstract Alias Memoize Method SigHandler); sub import{ my $pkg = shift; my @attrs = @_ ? @_ : @DEFAULT_ATTRIBUTES; for my $attr (@attrs){ eval qq{ require Attribute::$attr; }; $@ and Carp::croak $@; # import is not neccessary for Attribute modules. } } "Rosebud"; # for MARCEL's sake, not 1 -- dankogai __END__