use Gruntmaster::Page;
use Gruntmaster::Page::Log;
-use Gruntmaster::Data qw/contests jobcard problems users/;
+use Gruntmaster::Data qw/contests jobcard problems users PUBLISH/;
sub generate{
my $what = shift;
- say STDERR "Generating $what";
- Gruntmaster::Page::generate $what;
+ say STDERR "Generating page $what";
+ PUBLISH genpage => $what;
}
generate "index.html";
#!/usr/bin/perl -w
use v5.14;
-use Gruntmaster::Page qw/generate/;
+use Gruntmaster::Data qw/PUBLISH/;
-generate $_ for @ARGV;
+PUBLISH genpage => $_ for @ARGV;
use v5.14;
use Gruntmaster::Data qw/SUBSCRIBE WAIT_FOR_MESSAGES/;
-use Gruntmaster::Page qw/_generate/;
+use Gruntmaster::Page;
-SUBSCRIBE 'genpage', \&_generate;
+SUBSCRIBE 'genpage', \&Gruntmaster::Page::generate;
WAIT_FOR_MESSAGES 86400 while 1;
1;
use 5.014000;
use strict;
use warnings;
-use parent qw/Exporter/;
-our @EXPORT_OK = qw/generate _generate/;
use Fcntl qw/:flock/;
use File::Basename qw/fileparse/;
declaregen 'Pb::Entry' => qr,^${contest}pb/$component$,;
}
-sub _generate{
+sub generate{
my ($path) = @_;
my ($path_noext, $ext) = $path =~ m/^(.*)\.(.*)$/;
my ($basename, $directories) = fileparse $path_noext;
close $typemap;
}
-sub generate{
- PUBLISH 'genpage', shift;
-}
-
1;
__END__
# Below is stub documentation for your module. You'd better edit it!