Test::Class::Moose::AttributeRegistry - Global registry of tags by class and method.
version 0.99
use Test::Class::Moose::AttributeRegistry; my @tags = Test::Class::Moose::AttributeRegistry->tags; print Test::Class::Moose::AttributeRegistry->method_has_tag( 'TestsFor::FooBar', 'test_baz', 'network' );
This class permits addition and querying of the tags and plans defined on methods via attributes. It's been gleefully stolen from Attribute::Method::Tags and is for internal use only. Don't rely on this code.
All the following are class methods, as the attribute registry is shared globally. Note that all parameters for any of the methods below are required.
Add a numeric (or undef) plan to a method.
Returns the numeric (or undef) plan for a method if that was set via the Test or Tests attributes.
Test
Tests
Returns true if either Test or Tests was declared for a method. Used to identify something as a test method even if the method name doesn't begin with test_.
test_
Adds the given list of tags (as an array-ref) for the specified class/method combination. An exception will be raised if either the tags are non-alphanumeric or the method is one that has already had tags registered for it.
Find all tags defined for all methods. Returns a sorted list of tags.
Returns a boolean (0|1) indicating whether the given class has any method with the specified tag.
Returns a boolean (0|1) indicating whether the given method in the given class has the specified tag.
Attribute-based interface for adding tags to methods. Your author "liberated" this code from Attribute::Method::Tags::Registry (with a tip 'o the keyboard to Mark Morgan for his work on this).
Bugs may be submitted at https://github.com/houseabsolute/test-class-moose/issues.
I am also usually active on IRC as 'autarch' on irc://irc.perl.org.
irc://irc.perl.org
The source code repository for Test-Class-Moose can be found at https://github.com/houseabsolute/test-class-moose.
Curtis "Ovid" Poe <ovid@cpan.org>
Dave Rolsky <autarch@urth.org>
This software is copyright (c) 2012 - 2021 by Curtis "Ovid" Poe.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
The full text of the license can be found in the LICENSE file included with this distribution.
To install Test::Class::Moose, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Test::Class::Moose
CPAN shell
perl -MCPAN -e shell install Test::Class::Moose
For more information on module installation, please visit the detailed CPAN module installation guide.