diff options
author | Norbert Preining <preining@logic.at> | 2007-12-27 11:33:46 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2007-12-27 11:33:46 +0000 |
commit | cc66a70788e2ffe5b72298345ec3fa0ff2eaa53b (patch) | |
tree | 59155582b406101c70420b2184b26be11a111dec /Master/tlpkg/TeXLive/TLPDB.pm | |
parent | 8322c99a6cf060c963dd390638034c8d480a537b (diff) |
add check-execute-consistency, add $tlpdb->find_file and $tlpobj->contains_file
git-svn-id: svn://tug.org/texlive/trunk@5953 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/TeXLive/TLPDB.pm')
-rw-r--r-- | Master/tlpkg/TeXLive/TLPDB.pm | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/Master/tlpkg/TeXLive/TLPDB.pm b/Master/tlpkg/TeXLive/TLPDB.pm index b289ca87df3..007dc3477d3 100644 --- a/Master/tlpkg/TeXLive/TLPDB.pm +++ b/Master/tlpkg/TeXLive/TLPDB.pm @@ -30,6 +30,7 @@ C<TeXLive::TLPDB> -- A database of TeX Live Packages $tlpdb->add_tlpobj($tlpobj); $tlpdb->get_package("packagename"); $tlpdb->list_packages; + $tlpdb->find_file("filename"); $tlpdb->collections; $tlpdb->schemes; $tlpdb->updmap_cfg_lines; @@ -307,6 +308,27 @@ sub list_packages { =pod +=item C<< $tlpdb->find_file("filename") >> + +The C<find_file> returns a list of packages:filename +containing a file named C<filename>. + +=cut + +sub find_file { + my ($self,$fn) = @_; + my @ret; + foreach my $pkg ($self->list_packages) { + my @foo = $self->get_package($pkg)->contains_file($fn); + foreach my $f ($self->get_package($pkg)->contains_file($fn)) { + push @ret, "$pkg:$f"; + } + } + return(@ret); +} + +=pod + =item C<< $tlpdb->collections >> The C<collections> function returns the list of all collections. |