# This file belongs to TLPM v2.21, TeX Live Package Manager # Public Domain, P.Jackowski@gust.org.pl # blng [-pf] # display packages containing (to which the belongs to) sub blng { my ($arg,$pkg); my $count = 0; local $inclby_method = \&get_pkg_belongs; local $is_method = \&is_pkg; my $pkges = $source_pkges; while(defined($arg = shift)) { $arg eq '' and next or &no_opt($arg) and $pkg = $arg or &is_opt($arg,'p','package') and $inclby_method = \&get_pkg_belongs and $is_method = \&is_pkg or &is_opt($arg,'f','file') and $inclby_method = \&get_file_belongs and $is_method = \&is_file or &is_opt($arg,'h','help') and return $heeelp -> ('blng') or &rem_opt($arg) and return $error{'wrong_opt'} -> ($arg,'blng --help'); } return $error{'pkg_unspec'} -> () if $pkg eq ''; return if &read_source(); $is_method -> ($pkg,$pkges) or return $error{'not_found'} -> ($pkg); $mess -> (map {++$count;$_} $inclby_method -> ($pkg,$pkges)); $mess -> ("\n"); if($tlpm_redir < 2) { $message -> (&one_or_more($count,'parent bundle','parent bundles')); } } 1;