Youri::Package::Relationship - Package relationship class


Youri-Package documentation Contained in the Youri-Package distribution.

Index


Code Index:

NAME

Top

Youri::Package::Relationship - Package relationship class

DESCRIPTION

Top

This class represent a relationship from the package owning it to another package.

CLASS METHODS

Top

new(%args)

Creates and returns a new Youri::Package::Relationship object.

get_name()

Returns the name of the package this relationship applies to.

get_range()

Returns the revision range for which this relationship applies.


Youri-Package documentation Contained in the Youri-Package distribution.
# $Id: Relationship.pm 1462 2007-02-12 20:56:03Z guillomovitch $
package Youri::Package::Relationship;

use strict;
use warnings;
use Carp;

use constant NAME  => 0;
use constant RANGE => 1;

sub new {
    my ($class, $name, $range) = @_;

    return bless [
        $name,
        $range
    ], $class;
}

sub get_name {
    my ($self) = @_;
    croak "Not a class method" unless ref $self;

    return $self->[NAME];
}

sub get_range {
    my ($self) = @_;
    croak "Not a class method" unless ref $self;

    return $self->[RANGE];
}

1;