r28048 - /trunk/dh-make-perl/lib/Debian/Dependencies.pm

dmn at users.alioth.debian.org dmn at users.alioth.debian.org
Thu Dec 11 08:09:24 UTC 2008


Author: dmn
Date: Thu Dec 11 08:09:21 2008
New Revision: 28048

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=28048
Log:
Dependencies: add some real POD plus proper copyright and license

Modified:
    trunk/dh-make-perl/lib/Debian/Dependencies.pm

Modified: trunk/dh-make-perl/lib/Debian/Dependencies.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/lib/Debian/Dependencies.pm?rev=28048&op=diff
==============================================================================
--- trunk/dh-make-perl/lib/Debian/Dependencies.pm (original)
+++ trunk/dh-make-perl/lib/Debian/Dependencies.pm Thu Dec 11 08:09:21 2008
@@ -1,12 +1,28 @@
-# List of Debian::Dependencyp objects
-# Overrides the stringification operator so that one can use
-# Debian::Dependencies and a string, consisting of list of dependencies
-# interchangably
-#
-# my $dl = Debian::Dependencies->new('perl, libfoo-perl (>= 3.4)');
-# print $dl->[1]->ver;      # 3.4
-# print $dl->[1];           # libfoo-perl (>= 3.4)
-# print $dl;                # perl, libfoo-perl (>= 3.4)
+=head1 NAME
+
+Debian::Dependencies -- a list of Debian::Dependency objects
+
+=head1 SYNOPSIS
+
+    my $dl = Debian::Dependencies->new('perl, libfoo-perl (>= 3.4)');
+    print $dl->[1]->ver;      # 3.4
+    print $dl->[1];           # libfoo-perl (>= 3.4)
+    print $dl;                # perl, libfoo-perl (>= 3.4)
+
+=head1 DESCRIPTION
+
+Debian::Dependencies a list of Debian::Dependency objects, with automatic
+construction and stringification.
+
+Objects of this class are blessed array references. You can safely treat them
+as arrayrefs, as long as the elements you put in them are instances of the
+Debian::Dependency class.
+
+When used in string context, Debian::Dependencies converts itself into a
+comma-delimitted list of dependencies, suitable for dependency fields of
+F<debian/control> files.
+
+=cut
 
 package Debian::Dependencies;
 use strict;
@@ -15,6 +31,17 @@
 
 use overload
     '""'   => \&stringify;
+
+=head2 CLASS METHODS
+
+=over 4
+
+=item new(dependency-string)
+
+Constructs a new Debian::Dependencies object. Accepts one scalar argument,
+which is parsed and turned into an arrayref of Debian::Dependency objects.
+
+=cut
 
 sub new {
     my ( $class, $val ) = @_;
@@ -28,6 +55,18 @@
     }
 }
 
+=back
+
+=head2 OBJECT METHODS
+
+=over 4
+
+XXX TO BE FILLED
+
+=back
+
+=cut
+
 sub stringify {
     my $self = shift;
 
@@ -35,3 +74,37 @@
 }
 
 1;
+
+=head1 SEE ALSO
+
+L<Debian::Dependency>
+
+=head1 AUTHOR
+
+=over 4
+
+=item Damyan Ivanov <dmn at debian.org>
+
+=back
+
+=head1 COPYRIGHT & LICENSE
+
+=over 4
+
+=item Copyright (C) 2008 Damyan Ivanov <dmn at debian.org>
+
+=back
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License version 2 as published by the Free
+Software Foundation.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
+Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+=cut




More information about the Pkg-perl-cvs-commits mailing list