summaryrefslogtreecommitdiff
path: root/Master/tlpkg/TeXLive
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2007-07-12 10:45:17 +0000
committerNorbert Preining <preining@logic.at>2007-07-12 10:45:17 +0000
commit4c5a86b6e3aa31a7649675d3efefac6c364c3db0 (patch)
tree19fcdd1be019cc5ded536867b5f2f375dcf0d08c /Master/tlpkg/TeXLive
parent48e243d72710f0945ec3ac1cf1df148d96a4de0a (diff)
add a function $TLPDB->list_packages that returns a list of all installed
packages git-svn-id: svn://tug.org/texlive/trunk@4571 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/TeXLive')
-rw-r--r--Master/tlpkg/TeXLive/TLPDB.pm13
1 files changed, 12 insertions, 1 deletions
diff --git a/Master/tlpkg/TeXLive/TLPDB.pm b/Master/tlpkg/TeXLive/TLPDB.pm
index cc426df6dcb..a20bf491ba7 100644
--- a/Master/tlpkg/TeXLive/TLPDB.pm
+++ b/Master/tlpkg/TeXLive/TLPDB.pm
@@ -26,6 +26,7 @@ TeXLive::TLPDB - a database of TeX Live Packages
$tlpdb->generate_listfiles([$destdir]);
$tlpdb->add_objpkg($tlpobj);
$tlpdb->get_package("packagename");
+ $tlpdb->list_packages;
$tlpdb->package_revision("packagename");
=head1 DESCRIPTION
@@ -145,7 +146,17 @@ sub get_package {
=pod
-The C<package_revision> functions returns the the revision of the
+The C<list_packages> function returns the list of all included packages.
+
+=cut
+sub list_packages {
+ my $self = shift;
+ return (sort keys %{$self->{'tlps'}});
+}
+
+=pod
+
+The C<package_revision> function returns the the revision of the
package named in the first argument.
=cut