use strict;
use warnings FATAL => qw(all);
-use make::configure;
-
BEGIN {
+ require 5.8.0;
push @INC, '.';
+}
+
+BEGIN {
+ # HACK: for some reason this needs to be in a second BEGIN block
+ # or it doesn't receive the updated @INC from above.
+ use make::configure;
unless (module_installed("LWP::Simple")) {
die "Your system is missing the LWP::Simple Perl module!";
}
}
my $mod;
- for (split /\n+/, $response->decoded_content) {
+ for (split /\n+/, $response->content) {
s/^\s+//; # ignore whitespace at start
next if /^#/;
if (/^module (\S+) (\S+) (\S+)/) {
$mod->{description} = $1;
} elsif (/^mask (.*)/) {
$mod->{mask} = $1;
- } elsif (m#^source (http://\S+)#) {
+ } elsif (/^source (\S+)/) {
parse_url $1;
} else {
print "Unknown line in $src: $_\n";
if ($response->is_success) {
open(MF, ">src/modules/$mod.cpp") or die "\nFilesystem not writable: $!";
- print MF $response->decoded_content;
+ print MF $response->content;
close(MF);
print " - done\n";
} else {