-sub globlist_to_pagespec ($) {
- my @globlist=split(' ', shift);
-
- my (@spec, @skip);
- foreach my $glob (@globlist) {
- if ($glob=~/^!(.*)/) {
- push @skip, $glob;
- }
- else {
- push @spec, $glob;
- }
- }
-
- my $spec=join(' or ', @spec);
- if (@skip) {
- my $skip=join(' and ', @skip);
- if (length $spec) {
- $spec="$skip and ($spec)";
- }
- else {
- $spec=$skip;
- }
- }
- return $spec;
-}
-
-sub is_globlist ($) {
- my $s=shift;
- my $ret= ( $s =~ /[^\s]+\s+([^\s]+)/ && $1 ne "and" && $1 ne "or" );
- print STDERR "warning: deprecated GlobList style PageSpec \"$s\" will stop working in ikiwiki version 3.0\n"
- if $ret && $s !~ /TMPL_VAR/; # hack alert
- return $ret;
-}
-