Michael Graham > Palm-Progect > Palm::Progect::Record

Download:
Palm-Progect-2.0.4.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Source  

NAME ^

Palm::Progect::Record - Individual Records of the Progect Database

SYNOPSIS ^

    for my $rec (@{ $progect->records }) {
        my $description = $rec->description;
        my $priority    = $rec->priority;
        my $category    = $rec->category_name;
        print "[$priority] {$category} $description\n";
    }

DESCRIPTION ^

Each Palm::Progect object contains a list of records in its records method.

Each record is a Palm::Progect::Record object.

CLASS METHODS ^

set_categories

Class method to set all available category names at once, using the Palm::StdAppinfo format of a list of hashrefs in the form of:

    { name => 'Some cat', id => 7, renamed => 'who cares' }
get_categories

Class method to get all available categories using the Palm::StdAppinfo format of a list of hashrefs in the form of:

    { name => 'Some cat', id => 7, renamed => 'who cares' }

METHODS ^

description

The text of the record

note

The note attached to the record, if any. If the record does not have a note, then this value will be false.

type

The type of the record

Type will be one of the six types of records:

RECORD_TYPE_PROGRESS
RECORD_TYPE_NUMERIC
RECORD_TYPE_ACTION
RECORD_TYPE_INFO
RECORD_TYPE_EXTENDED
RECORD_TYPE_LINK

These symbols are available from the Palm::Progect::Constants module.

For instance:

    use Palm::Progect::Constants;

    if ($rec->type == RECORD_TYPE_ACTION) {
        print "The record is an action item!\n";
    }
priority

Priority of the item, 1 - 5, or 0, for No priority.

completed

The value of this field depends on the type of the record.

For action items, completed is true if the record has been completed, false otherwise.

For progress items, completed is the percent complete, a value from 0-100.

For numeric items (e.g. 5/20), completed reflects the percent complete (see completed_actual and completed_limit, below). Note that setting the completed method will not affect completed_actual or completed_limit.

completed_actual
completed_limit

Numeric items indicate their 'completeness' with an arbitrary ratio: Some value out of another value, for instance 5 out of 20, or 5/20, where 5 is the completed_actual and 20 is the completed_limit.

level

The indent level of the record.

has_next

True if the record has another record following it, false otherwise.

has_child

True if the record contains another record, false otherwise.

has_prev

True if the record follows another record, false otherwise.

is_opened

True if the record is open, revealing the records it contains, false otherwise.

has_todo

True if the record links to a record in the todo database, false otherwise.

date_due

The due date of the record, in unix time format (i.e. seconds since the epoch). If the record does not have a due date then this value will be false.

category_name

The name of the record's category, if any. If you set category_name to the name of a category that doesn't yet exist, then that category will be created.

AUTHOR ^

Michael Graham <mag-perl@occamstoothbrush.com>

Copyright (C) 2002-2005 Michael Graham. All rights reserved. This program is free software. You can use, modify, and distribute it under the same terms as Perl itself.

The latest version of this module can be found on http://www.occamstoothbrush.com/perl/

SEE ALSO ^

progconv

Palm::PDB(3)

http://progect.sourceforge.net/

syntax highlighting: