From 3b9f70f16276562300c129a1a46f02fd59516a74 Mon Sep 17 00:00:00 2001 From: James Raspass Date: Thu, 12 Sep 2024 13:43:01 +0100 Subject: [PATCH] Replace "base" with "parent" As per the documentation, parent is encouraged these days: "Unless you are using the fields pragma, consider this module discouraged in favor of the lighter-weight parent." Since we don't use the fields pragma let's use parent. It'll only be an extra dep for Perl 5.8 users since it's core in 5.10+. --- Changes | 1 + META.json | 4 ++-- Makefile.PL | 6 +++--- README.md | 2 +- cpanfile | 4 ++-- lib/WWW/Mechanize.pm | 4 ++-- t/local/overload.t | 2 +- 7 files changed, 12 insertions(+), 11 deletions(-) diff --git a/Changes b/Changes index 4610e1f1..aa380a17 100644 --- a/Changes +++ b/Changes @@ -2,6 +2,7 @@ Revision history for WWW::Mechanize {{$NEXT}} - Fix minor typo in SYNOPSIS example code comment (GH#379) (Paul Cochrane) + - Replace "base" with "parent" (GH#XXX) (James Raspass) 2.18 2024-01-30 14:29:44Z [FIXED] diff --git a/META.json b/META.json index 4e3800a4..01399673 100644 --- a/META.json +++ b/META.json @@ -4,7 +4,7 @@ "Andy Lester " ], "dynamic_config" : 0, - "generated_by" : "Dist::Zilla version 6.031, CPAN::Meta::Converter version 2.150010", + "generated_by" : "Dist::Zilla version 6.032, CPAN::Meta::Converter version 2.150010", "license" : [ "perl_5" ], @@ -79,7 +79,7 @@ "Tie::RefHash" : "0", "URI::URL" : "0", "URI::file" : "0", - "base" : "0", + "parent" : "0", "perl" : "5.008", "strict" : "0", "warnings" : "0" diff --git a/Makefile.PL b/Makefile.PL index 52e868d1..2847f9f1 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -1,4 +1,4 @@ -# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.031. +# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.032. use strict; use warnings; @@ -35,7 +35,7 @@ my %WriteMakefileArgs = ( "Tie::RefHash" => 0, "URI::URL" => 0, "URI::file" => 0, - "base" => 0, + "parent" => 0, "strict" => 0, "warnings" => 0 }, @@ -100,9 +100,9 @@ my %FallbackPrereqs = ( "URI::Escape" => 0, "URI::URL" => 0, "URI::file" => 0, - "base" => 0, "bytes" => 0, "lib" => 0, + "parent" => 0, "strict" => 0, "warnings" => 0 ); diff --git a/README.md b/README.md index 35a36610..e07b5c5a 100644 --- a/README.md +++ b/README.md @@ -1528,7 +1528,7 @@ like to _systematically_ perform the above HTML substitution, you would overload `update_html` in a subclass thusly: package MyMech; - use base 'WWW::Mechanize'; + use parent 'WWW::Mechanize'; sub update_html { my ($self, $html) = @_; diff --git a/cpanfile b/cpanfile index c3d604f7..265e617c 100644 --- a/cpanfile +++ b/cpanfile @@ -1,4 +1,4 @@ -# This file is generated by Dist::Zilla::Plugin::CPANFile v6.031 +# This file is generated by Dist::Zilla::Plugin::CPANFile v6.032 # Do not edit this file directly. To change prereqs, edit the `dist.ini` file. requires "Carp" => "0"; @@ -16,7 +16,7 @@ requires "Scalar::Util" => "1.14"; requires "Tie::RefHash" => "0"; requires "URI::URL" => "0"; requires "URI::file" => "0"; -requires "base" => "0"; +requires "parent" => "0"; requires "perl" => "5.008"; requires "strict" => "0"; requires "warnings" => "0"; diff --git a/lib/WWW/Mechanize.pm b/lib/WWW/Mechanize.pm index 3ac3aca1..2a7a8f8d 100644 --- a/lib/WWW/Mechanize.pm +++ b/lib/WWW/Mechanize.pm @@ -142,7 +142,7 @@ use HTML::Form 1.00 (); use HTML::TokeParser (); use Scalar::Util qw( tainted ); -use base 'LWP::UserAgent'; +use parent 'LWP::UserAgent'; our $HAS_ZLIB; @@ -3202,7 +3202,7 @@ like to I perform the above HTML substitution, you would overload C in a subclass thusly: package MyMech; - use base 'WWW::Mechanize'; + use parent 'WWW::Mechanize'; sub update_html { my ($self, $html) = @_; diff --git a/t/local/overload.t b/t/local/overload.t index 3d10f636..fb527725 100644 --- a/t/local/overload.t +++ b/t/local/overload.t @@ -48,7 +48,7 @@ isa_ok( $server, 'LocalServer' ); do { package MyMech; - use base 'WWW::Mechanize'; + use parent 'WWW::Mechanize'; sub update_html { my $self = shift;