From 7dcc6afa75d5318325856fdef0456f4ddf1672b1 Mon Sep 17 00:00:00 2001 From: Kent Fredric Date: Fri, 6 Jan 2017 12:32:50 +1300 Subject: [PATCH] Remove dynamic update code As this basically makes builds unreproducale anyway, and the download URI is invariant meaning we can't even approximate the same logic via SRC_URI without having frequently changing Manifests, but no change in URI. diff -ruN Mozilla-PublicSuffix-v1.0.4.orig/Build.PL Mozilla-PublicSuffix-v1.0.4/Build.PL --- Mozilla-PublicSuffix-v1.0.4.orig/Build.PL 2021-05-04 21:45:11.000000000 +0200 +++ Mozilla-PublicSuffix-v1.0.4/Build.PL 2021-07-09 22:58:00.434038763 +0200 @@ -5,11 +5,9 @@ use utf8; use open ":encoding(UTF-8)"; use Carp qw(croak); -use HTTP::Tiny; use Module::Build; use IO::File; use Tie::File; -use URI; my $builder = Module::Build->new( dist_name => "Mozilla-PublicSuffix", @@ -27,11 +25,9 @@ 'perl' => '5.008' }, 'configure_requires' => { - 'HTTP::Tiny' => '0', 'IO::File' => '0', 'Module::Build' => '0.28', 'Tie::File' => '0', - 'URI' => '0', 'perl' => '5.008' }, 'requires' => { @@ -42,28 +38,6 @@ ); my $dat_file = "effective_tld_names.dat"; -my $get_new_list = $builder->y_n( - "Check for a new version of the Public Suffix List?", "N" -); -if ($get_new_list) { - my $http = HTTP::Tiny->new( timeout => 6 ); - my $list_uri = URI->new( - "https://publicsuffix.org/list/public_suffix_list.dat" - ); - $list_uri->query_form({ raw => 1 }); - my %options = ( - headers => { - "If-Modified-Since" => "Fri, 17 May 2013 00:00:00 UTC" - } - ); - my $response = $http->get($list_uri, \%options); - if ( $response->{status} == 200 ) { - IO::File->new($dat_file, "w")->print($response->{content}); - } - elsif ( $response->{status} != 304 ) { - croak "Unable to download public suffix list."; - } -} # Divide rules from list into sets: my $rules = join " ", map { diff -ruN Mozilla-PublicSuffix-v1.0.4.orig/META.yml Mozilla-PublicSuffix-v1.0.4/META.yml --- Mozilla-PublicSuffix-v1.0.4.orig/META.yml 2021-05-04 21:45:11.000000000 +0200 +++ Mozilla-PublicSuffix-v1.0.4/META.yml 2021-07-09 22:58:15.717235925 +0200 @@ -11,11 +11,9 @@ Test::More: '0' perl: '5.008' configure_requires: - HTTP::Tiny: '0' IO::File: '0' Module::Build: '0.28' Tie::File: '0' - URI: '0' perl: '5.008' dynamic_config: 0 generated_by: 'Dist::Zilla version 6.015, CPAN::Meta::Converter version 2.150010'