| CPAN-Index documentation | Contained in the CPAN-Index distribution. |
CPAN::Index::Package - An object representing a CPAN package
CPAN::Index::Package object represent CPAN packages in the index.
The name accessor returns the package namespace.
This is a valid Perl package name, such as "Foo::Bar".
The version accessor returns the current version of the package.
Returns a version object, or undef if the package is unversioned.
The path accessor returns the package's location, as a path relative
to the CPAN author root.
That is, a string in the form "L/LB/LBROCARD/Acme-Colour-1.00.tar.gz".
Bugs should be reported via the CPAN bug tracker
http://rt.cpan.org/NoAuth/ReportBug.html?Queue=CPAN-Index
For other issues, contact the author.
Adam Kennedy <cpan@ali.as>
CPAN::Index, Parse::CPAN::Authors, Parse::CPAN::Packages
Copyright (c) 2006 Adam Kennedy. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
| CPAN-Index documentation | Contained in the CPAN-Index distribution. |
package CPAN::Index::Package; use strict; use base 'DBIx::Class'; use version (); use vars qw{$VERSION}; BEGIN { $VERSION = '0.01'; } __PACKAGE__->load_components('Core'); __PACKAGE__->table('package'); __PACKAGE__->add_columns( name => { data_type => 'varchar', size => 255, is_nullable => 0, is_auto_increment => 0, default_value => '', }, version => { accessor => 'version_string', data_type => 'varchar', size => 32, is_nullable => 1, is_auto_increment => 0, default_value => '', }, path => { data_type => 'varchar', size => 255, is_nullable => 0, is_auto_increment => 0, default_value => '', }, ); __PACKAGE__->set_primary_key('name'); sub version { my $self = shift; my $value = $self->version_string(@_); defined($value) ? version->new($value) : undef; } 1; __END__