GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  DATA::TAXONOMY::TAGS (3)

.ds Aq ’

NAME

Data::Taxonomy::Tags - Represents a set of tags for any item

CONTENTS

SYNOPSIS



    use Data::Taxonomy::Tags;
   
    my $tags = Data::Taxonomy::Tags->new(perl tags cpan module system:meta);
   
    print $_, "\n" for $tags->tags;
   
    print $_, "\n" for $tags->categories;



DESCRIPTION

Data::Taxonomy::Tags will basically take care of managing tags for an item easier. You provide it with a string of tags and it’ll allow you to call methods to get all the tags and categories as well as add and delete tags from the list.

    Methods

new($string[,\%options]) The first argument is a string of tags. This string is stripped of any leading and trailing whitespace. The second argument, which is optional, is a hashref of options.

Returns a Data::Taxonomy::Tags object;
separator => [\s+, ] Specifies the regex pattern (or compiled regex) which will be used to split the tags apart and the character(s) used between tags when converting the object back to a string. Make sure to escape any special characters in the regex pattern.

If the value is not an arrayref, then the same value is used for both operations (and is escaped for the regex).

Defaults to [\s+, ].

category => [:, :] Specifies the regex pattern (or compiled regex) which will be used to split the tag name from it’s optional category and the character(s) used between the category and tag when converting to a string. Make sure to escape any special characters in the regex pattern.

If the value is not an arrayref, then the same value is used for both operations (and is escaped for the regex).

Defaults to [:, :].

tags Returns an array or arrayref (depending on context) of Data::Taxonomy::Tags::Tag objects.
add_to_tags($tags) Processes the string and adds the tag(s) to the object.
remove_from_tags($tags) Processes the string and removes the tag(s) from the object.
remove_category($category) Removes all tags with the specified category.
categories Returns an array or arrayref (depending on context) of the unique categories.
tags_with_category($category) Returns an array or arrayref (depending on context) of the tags with the specified category
as_string Returns the tag list as a string (that is, what was given to the constructor). Overloading is used as well to automatically call this method if the object is used in a string context.

BUGS

All bugs, open and resolved, are handled by RT at <https://rt.cpan.org/NoAuth/Bugs.html?Dist=Data-Taxonomy-Tags>.

Please report all bugs via <https://rt.cpan.org/NoAuth/ReportBug.html?Queue=Data-Taxonomy-Tags>.

LICENSE

Copyright 2005, Thomas R. Sibley.

You may use, modify, and distribute this package under the same terms as Perl itself.

AUTHOR

Thomas R. Sibley, <http://zulutango.org:82/>
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 DATA::TAXONOMY::TAGS (3) 2016-03-17

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.