Content deleted Content added
Updating published source |
Updating published source |
||
Line 9:
use POSIX qw/strftime/;
use Pod::Simple::Wiki;
use Data::Dumper;
use Fcntl ':mode';
Line 76 ⟶ 77:
close(X);
if($page=~/\.([^.]+)$/ && exists($extensions{$1})){
if($extensions{$1} eq 'perl'){
# Try to construct documentation
my $parser=Pod::Simple::Wiki->new('mediawiki');
my $x='';
$parser->output_string(\$x);
$parser->parse_string_document($pages{$pp});
$pages{"$pp/doc"}=$x if($parser->content_seen);
}
$pages{$pp}="<source lang=\"".$extensions{$1}."\">\n".$pages{$pp}."\n</so"."urce>";
} else {
$pages{$pp}="<pre>\n".$pages{$pp}."\n</pre>";
}
$pages{$pp}="\x7b\x7bombox|text=See \x5b\x5b/doc\x5d\x5d for formatted documentation\x7d\x7d\n".$pages{$pp} if(exists($pages{"$pp/doc"}));
$img='Gnome-fs-regular.svg';
} else {
Line 174 ⟶ 184:
$self->warn("Write error for $k: ".$r->{'error'});
next;
} else {
$self->warn("Updated $k");
}
} else {
$self->warn("No update needed for $k");
}
delete($self->{'pages'}{$k});
|