]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - modulemanager
Fix ModuleManager's external source lists not working with HTTPS.
[user/henk/code/inspircd.git] / modulemanager
index b107f2c1fad62032d1b07dd6fd60de7e8374859e..f00234994a4dfc59990a1128b46ec4f4f9edd250 100755 (executable)
 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!";
        }
@@ -70,7 +75,7 @@ sub parse_url {
        }
 
        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+)/) {
@@ -94,7 +99,7 @@ sub parse_url {
                        $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";
@@ -354,7 +359,7 @@ for my $mod (sort keys %todo) {
 
        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 {