summaryrefslogtreecommitdiff
path: root/Master/tlpkg/TeXLive/TLPSRC.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Master/tlpkg/TeXLive/TLPSRC.pm')
-rw-r--r--Master/tlpkg/TeXLive/TLPSRC.pm10
1 files changed, 6 insertions, 4 deletions
diff --git a/Master/tlpkg/TeXLive/TLPSRC.pm b/Master/tlpkg/TeXLive/TLPSRC.pm
index 22c0d077b08..f1afcbdc550 100644
--- a/Master/tlpkg/TeXLive/TLPSRC.pm
+++ b/Master/tlpkg/TeXLive/TLPSRC.pm
@@ -8,6 +8,7 @@
package TeXLive::TLPSRC;
use FileHandle;
+use TeXLive::TLConfig qw($CategoriesRegexp);
use TeXLive::TLPOBJ;
use TeXLive::TLTREE;
@@ -19,7 +20,7 @@ sub new
my %params = @_;
my $self = {
name => $params{'name'},
- category => defined($params{'category'}) ? $params{'category'} : "Package",
+ category => defined($params{'category'}) ? $params{'category'} : $DefaultCategory,
shortdesc => $params{'shortdesc'},
longdesc => $params{'longdesc'},
catalogue => $params{'catalogue'},
@@ -86,7 +87,7 @@ sub from_file
if ($line =~ /^shortdesc\s*(.*)$/) {
$shortdesc = "$1";
next;
- } elsif ($line =~ /^category\s+(Collection|Scheme|Package|TLCore|Documentation)$/) {
+ } elsif ($line =~ /^category\s+$CategoriesRegexp$/) {
$category = "$1";
next;
} elsif ($line =~ /^longdesc\s+(.*)$/) {
@@ -449,7 +450,8 @@ identifies the package, C<value> must consist only of C<[-_a-zA-Z0-9]>.
=item C<category>
identifies the category into which this package belongs. Possible categories
-are C<Collection>, C<Scheme>, C<TLCore>, C<Documentation>, C<Package>.
+are defined in C<TeXLive::TLConfig>, but are currently
+C<Collection>, C<Scheme>, C<TLCore>, C<Documentation>, C<Package>.
Note that there is no inherent checking whether a C<tlpsrc> file called
C<collection-something> actually belongs to the category C<Collection>.
Most packages will fall into the C<Package> category.
@@ -683,7 +685,7 @@ enrich it which the actual content from C<$tltree> to a C<TLPOBJ> object.
=head1 SEE ALSO
-The modules L<TeXLive::TLUtils>, L<TeXLive::TLPOBJ>,
+The modules L<TeXLive::TLConfig>, L<TeXLive::TLUtils>, L<TeXLive::TLPOBJ>,
L<TeXLive::TLPDB>, L<TeXLive::TLTREE>.
=head1 AUTHORS AND COPYRIGHT