RT::Keyword(3)

NAME
 RT::Keyword - Manipulate an RT::Keyword record

SYNOPSIS
  use RT::Keyword;

  my $keyword = RT::Keyword->new($CurrentUser);
  $keyword->Create( Name => 'tofu',
                    Description => 'fermented soy beans',
                  );

  my $keyword2 = RT::Keyword->new($CurrentUser);
  $keyword2->Create( Name   => 'beast',
                    Description => 'a wild animal',
                    Parent => $keyword->id(),
                  );

DESCRIPTION
An RT::Keyword object is an arbitrary string.

METHODS

new CURRENT_USER
    Takes a single argument, an RT::CurrentUser object. Instantiates a new (uncreated) RT::Keyword object.

Create KEY => VALUE, ...
    Takes a list of key/value pairs and creates a the object. Returns the id of the newly created record, or false if there was an error.

    Keys are:

    Name - the keyword itself Description - (not yet used) Parent - optional link to another RT::Keyword, allowing keyword to be arranged in a hierarchical fashion. Can be specified by id or Name.

  LoadByPath STRING
LoadByPath takes a string. Whatever character starts the string is assumed to be a delimter. The routine parses the keyword path description and tries to load the keyword described by that path. It returns a numerical status and a textual message. A non-zero status means 'Success'.

  LoadByNameAndParentId NAME PARENT_ID
Takes two arguments, a keyword name and a parent id. Loads a keyword into
  the current object.

  Load KEYWORD
Loads KEYWORD, either by id if it's an integer or by Path, otherwise

Path
      Returns this Keyword's full path going back to the root. (eg /OS/Unix/Linux/Redhat if
    this keyword is "Redhat" )

  RelativePath KEYWORD_OBJ
Takes a keyword object. Returns this keyword's path relative to that keyword.

Bugs
    Currently assumes that the "other" keyword is a predecessor of this keyword

ParentObj
      Returns an RT::Keyword object of this Keyword's 'parents'

Children
    Return an RT::Keywords object this Object's children.

Descendents [ NUM_GENERATIONS [ EXCLUDE_HASHREF ]  ]
    Returns an ordered (see Tie::IxHash) hash reference of the descendents of this keyword, possibly limited to a given number of generations. The keys are RT::Keyword ids, and the values are strings containing the Names of those RT::Keywords.

  CurrentUserHasRight
Helper menthod for HasRight. Presets Principal to CurrentUser then calls HasRight.

  HasRight
Takes a param-hash consisting of "Right" and "Principal" Principal is an RT::User object or an RT::CurrentUser object. "Right" is a textual Right string that applies to Keywords.

AUTHOR
Ivan Kohler <ivan-rt@420.am>

BUGS
Yes.

SEE ALSO
RT::Keywords, RT::ObjectKeyword, RT::ObjectKeywords, RT::Ticket, RT::Record

[A=cut

1;

POD ERRORS
Hey! The above document had some coding errors, which are explained below:

Around line 137:
    You forgot a '=back' before '=head2'

Around line 241:
    '=item' outside of any '=over'

Around line 264:
    You forgot a '=back' before '=head2'

Around line 269:
    '=item' outside of any '=over'

Around line 388:
    You forgot a '=back' before '=head2'

Around line 428:
    =back without =over