From b6cf76ded2c5eac72ae87d5a1554e9f886698a26 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 20 Mar 2011 18:34:02 +0000 Subject: copyright years, doc fixes git-svn-id: svn://tug.org/texlive/trunk@21770 c570f23f-e606-0410-a88d-b1316a301751 --- Master/tlpkg/TeXLive/TLPDB.pm | 54 ++++++++++++++++++++++--------------------- 1 file changed, 28 insertions(+), 26 deletions(-) (limited to 'Master/tlpkg/TeXLive/TLPDB.pm') diff --git a/Master/tlpkg/TeXLive/TLPDB.pm b/Master/tlpkg/TeXLive/TLPDB.pm index 2138e4e4179..4f6c8fd5415 100644 --- a/Master/tlpkg/TeXLive/TLPDB.pm +++ b/Master/tlpkg/TeXLive/TLPDB.pm @@ -1,6 +1,6 @@ # $Id$ # TeXLive::TLPDB.pm - module for using tlpdb files -# Copyright 2007, 2008, 2009, 2010 Norbert Preining +# Copyright 2007, 2008, 2009, 2010, 2011 Norbert Preining # This file is licensed under the GNU General Public License version 2 # or any later version. @@ -97,14 +97,13 @@ my $_listdir; C<< TeXLive::TLPDB->new >> creates a new C object. If the argument C is given it will be initialized from the respective -location within $path. If -C<$path> begins with C or C, the program C -is used to download the file. -The C<$path> can start with C in which case it is treated as -a file on the filesystem in the usual way. +location starting at $path. If C<$path> begins with C or +C, the program C is used to download the file. The +C<$path> can also start with C in which case it is treated as a +file on the filesystem in the usual way. -Returns either an object of type C, or undef if the root -was given but no package could be read from that location. +Returns an object of type C, or undef if the root was +given but no package could be read from that location. =cut @@ -118,10 +117,11 @@ sub new { $_listdir = $params{'listdir'} if defined($params{'listdir'}); bless $self, $class; if (defined($self->{'root'})) { - my $nr_packages_read = $self->from_file("$self->{'root'}/$InfraLocation/$DatabaseName"); + my $nr_packages_read + = $self->from_file("$self->{'root'}/$InfraLocation/$DatabaseName"); if ($nr_packages_read == 0) { - # that is bad, we cannot read anything, so return undef - return(undef); + # that is bad, we didn't read anything, so return undef. + return undef; } } return $self; @@ -221,7 +221,7 @@ sub from_file { if (defined($self->{'root'})) { if ($self->{'root'} ne $root_from_path) { tlwarn("root=$self->{'root'}, root_from_path=$root_from_path\n"); - tlwarn("Initialisation from different location as originally given.\nHope you are sure!\n"); + tlwarn("Initialization from different location as originally given.\nHope you are sure!\n"); } } else { $self->root($root_from_path); @@ -442,19 +442,20 @@ sub _add_tlpcontainer { =pod -=item C<< $tlpdb->get_package("packagename") >> +=item C<< $tlpdb->get_package("pkgname") >> -The C function returns a reference to a C object -in case its name the the argument name coincide. +The C function returns a reference to the C object +corresponding to the I, or undef. =cut sub get_package { my ($self,$pkg) = @_; if (defined($self->{'tlps'}{$pkg})) { - return($self->{'tlps'}{$pkg}); + my $ret = $self->{'tlps'}{$pkg}; + return $self->{'tlps'}{$pkg}; } else { - return(undef); + return undef; } } @@ -473,20 +474,21 @@ sub list_packages { =pod -=item C<< $tlpdb->expand_dependencies >> - -This function takes as first argument the target TLPDB and then a list of -packages and returns the closure of this -list with respect to the depends operator. (Sorry, that was for -mathematicians) +=item C<< $tlpdb->expand_dependencies(["control",] $tlpdb, ($pkgs)) >> -If the very first argument is "-only-arch" then it expands only dependencies -of the form .ARCH. +If the first argument is the string C<"-only-arch">, expands only +dependencies of the form .ARCH. -If the very first argument is "-no-collections" then dependencies between +If the first argument is C<"-no-collections">, then dependencies between "same-level" packages (scheme onto scheme, collection onto collection, package onto package) are ignored. +The next (or first) argument is the target TLPDB, then a list of +packages. + +We return the closure of the package list with respect to the depends +operator. (Sorry, that was for mathematicians.) + =cut sub expand_dependencies { -- cgit v1.2.3