brian d foy > MyCPAN-Indexer-1.28_12 > MyCPAN::Indexer::Notes

Download:
MyCPAN-Indexer-1.28_12.tar.gz

Dependencies

Annotate this POD

Website

CPAN RT

New  1
Open  1
View/Report Bugs
Module Version: 1.28_12   Source  

NAME ^

MyCPAN::Indexer::Notes - Tiny class for MyCPAN component note passing

SYNOPSIS ^

Use in the coordinator object. This isn't really for the public.

DESCRIPTION ^

This is a scratchpad for the MyCPAN::Indexer components. As a component does part of its job, it can leave notes that other components can inspect and use.

This is a low-level implementation, so it's stupid about the keys and values that the components might use. It doesn't attempt to validate or constrain the notes in any way. It can, however, act as a base class for a custom notes class.

Methods

new

Create a new notes object. This is really just a fancy hash. You probably shouldn't call this yourself unless you are working in the coordinator object.

get_note( NOTE )

Get the note named NOTE. This could be anything that was set: a string, reference, and so on.

set_note( NOTE, SOMETHING )

Set the note named NOTE. This could be anything you like: a string, reference, and so on.

Convenience methods

This saves you the hassle of getting the value with get_note, changing it, and saving the new value with set_note.

increment_note( NOTE )

Increase the value of NOTE by one. Returns the previous value of NOTE.

decrement_note( NOTE )

Decrease the value of NOTE by one. Returns the previous value of NOTE.

push_onto_note( NOTE, LIST )

Add a value onto the end of the array reference value for NOTE.

unshift_onto_note( NOTE, LIST )

Add a value onto the front of the array reference value for NOTE.

get_note_list_element( NOTE, INDEX )

Return the list element at INDEX for the array reference stored in NOTE.

set_note_unless_defined( NOTE, VALUE )

Set the VALUE for NOTE unless NOTE already has a defined value. Returns the current value if it is already defined.

SOURCE AVAILABILITY ^

This code is in Github:

        git://github.com/briandfoy/mycpan-indexer.git

AUTHOR ^

brian d foy, <bdfoy@cpan.org>

COPYRIGHT AND LICENSE ^

Copyright (c) 2008-2013, brian d foy, All Rights Reserved.

You may redistribute this under the same terms as Perl itself.

syntax highlighting: