The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

JIRA::REST::Class::Mixins - An mixin class for JIRA::REST::Class that other objects can inherit methods from.

VERSION

version 0.12

METHODS

name_for_user

When passed a scalar that could be a JIRA::REST::Class::User object, returns the name of the user if it is a JIRA::REST::Class::User object, or the unmodified scalar if it is not.

key_for_issue

When passed a scalar that could be a JIRA::REST::Class::Issue object, returns the key of the issue if it is a JIRA::REST::Class::Issue object, or the unmodified scalar if it is not.

When passed two scalars, one that could be a JIRA::REST::Class::Issue::LinkType object and another that is a direction (inward/outward), returns the name of the link type and direction if it is a JIRA::REST::Class::Issue::LinkType object, or attempts to determine the link type and direction from the provided scalars.

dump

Returns a stringified representation of the object's data generated somewhat by Data::Dumper::Concise, but not descending into any objects that might be part of that data. If it finds objects in the data, it will attempt to represent them in some abbreviated fashion which may not display all the data in the object. For instance, if the object has a JIRA::REST::Class::Issue object in it for an issue with the key 'JRC-1', the object would be represented as the string 'JIRA::REST::Class::Issue->key(JRC-1)'. The goal is to provide a gist of what the contents of the object are without exhaustively dumping EVERYTHING. I use it a lot for figuring out what's in the results I'm getting back from the JIRA API.

INTERNAL METHODS

jira

Returns a JIRA::REST::Class object with credentials for the last JIRA user.

factory

An accessor for the JIRA::REST::Class::Factory.

JIRA_REST

An accessor that returns the JIRA::REST object being used.

REST_CLIENT

An accessor that returns the REST::Client object inside the JIRA::REST object being used.

JSON

An accessor that returns the JSON object inside the JIRA::REST object being used.

make_object

A pass-through method that calls JIRA::REST::Class::Factory::make_object().

make_date

A pass-through method that calls JIRA::REST::Class::Factory::make_date().

class_for

A pass-through method that calls JIRA::REST::Class::Factory::get_factory_class().

obj_isa

When passed a scalar that could be an object and a class string, returns whether the scalar is, in fact, an object of that class. Looks up the actual class using class_for(), which calls JIRA::REST::Class::Factory::get_factory_class().

cosmetic_copy THING

A utility function to produce a "cosmetic" copy of a thing: it clones the data structure, but if anything in the structure (other than the structure itself) is a blessed object, it replaces it with a stringification of that object that probably doesn't contain all the data in the object. For instance, if the object has a JIRA::REST::Class::Issue object in it for an issue with the key 'JRC-1', the object would be represented as the string 'JIRA::REST::Class::Issue->key(JRC-1)'. The goal is to provide a gist of what the contents of the object are without exhaustively dumping EVERYTHING.

RELATED CLASSES

AUTHOR

Packy Anderson <packy@cpan.org>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2017 by Packy Anderson.

This is free software, licensed under:

  The Artistic License 2.0 (GPL Compatible)