| Youri-Package documentation | Contained in the Youri-Package distribution. |
Youri::Package::Change - Package change class
This class represent a package change.
Creates and returns a new Youri::Package::Change object.
Return the time of this change.
Returns the textual description of this change, as as string.
Returns the textual description of this change, as as array reference of individual changes.
| Youri-Package documentation | Contained in the Youri-Package distribution. |
# $Id: Change.pm 1484 2007-02-18 21:10:00Z guillomovitch $ package Youri::Package::Change;
use strict; use warnings; use Carp; use constant AUTHOR => 0; use constant TIME => 1; use constant TEXT => 2;
sub new { my ($class, $author, $time, $text) = @_; return bless [ $author, $time, $text, ], $class; }
sub get_author { my ($self) = @_; croak "Not a class method" unless ref $self; return $self->[AUTHOR]; }
sub get_time { my ($self) = @_; croak "Not a class method" unless ref $self; return $self->[TIME]; }
sub get_raw_text { my ($self) = @_; croak "Not a class method" unless ref $self; return $self->[TEXT]; }
sub get_text_items { my ($self) = @_; croak "Not a class method" unless ref $self; return $self->[TEXT] =~ / ^ [-+ ] \s+ # list token (.*) # real text $ /xmg; } 1;