NAME
JIRA::REST::Class::Abstract - An abstract class for JIRA::REST::Class
that most of the other objects are based on.
VERSION
version 0.03
METHODS
init
Method to perform post-instantiation initialization of the object. The first argument will be the factory object which created the object.
mk_contextual_ro_accessors list of accessors to make
Because I didn't want to give up Class::Accessor::Fast, but wanted to be able to make contextual accessors when it was useful.
mk_deep_ro_accessor LIST OF KEYS TO HASH
Why do accessors have to be only for the top level of the hash? Why can't they be several layers deep? This method takes a list of keys for the hash this object is based on and creates an accessor that goes down deeper than just the first level.
mk_lazy_ro_accessor field, sub_ref_to_construct_value
Makes an accessor that checks to see if the value for the accessor has been loaded, and, if it hasn't, runs the provided subroutine to construct the value. Especially good for loading values that are objects populated by REST calls.
INTERNAL METHODS
unload_lazy
Clears the hash that tracks lazily loaded methods so they get loaded again.
populate_scalar_data
Code to make instantiating objects from $self->data easier.
populate_date_data
Code to make instantiating DateTime objects from $self->data easier.
populate_list_data
Code to make instantiating lists of objects from $self->data easier.
populate_scalar_field
Code to make instantiating objects from fields easier.
populate_list_field
Code to make instantiating lists of objects from fields easier.
mk_data_ro_accessors
Makes accessors for keys under $self->{data}
mk_field_ro_accessors
Makes accessors for keys under $self->{data}->{fields}
make_subroutine
Takes a subroutine name and a subroutine reference, and blesses the subroutine into the class used to call this method. Can be called with either a class name or a blessed object reference.
AUTHOR
Packy Anderson <packy@cpan.org>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2016 by Packy Anderson.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)