Skip to content

Commit

Permalink
Replace "base" with "parent"
Browse files Browse the repository at this point in the history
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+.
  • Loading branch information
JRaspass authored and oalders committed Sep 16, 2024
1 parent 8bd55ca commit 7c20e57
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 11 deletions.
1 change: 1 addition & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -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#381) (James Raspass)

2.18 2024-01-30 14:29:44Z
[FIXED]
Expand Down
4 changes: 2 additions & 2 deletions META.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"Andy Lester <andy at petdance.com>"
],
"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"
],
Expand Down Expand Up @@ -79,7 +79,7 @@
"Tie::RefHash" : "0",
"URI::URL" : "0",
"URI::file" : "0",
"base" : "0",
"parent" : "0",
"perl" : "5.008",
"strict" : "0",
"warnings" : "0"
Expand Down
6 changes: 3 additions & 3 deletions Makefile.PL
Original file line number Diff line number Diff line change
@@ -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;

Expand Down Expand Up @@ -35,7 +35,7 @@ my %WriteMakefileArgs = (
"Tie::RefHash" => 0,
"URI::URL" => 0,
"URI::file" => 0,
"base" => 0,
"parent" => 0,
"strict" => 0,
"warnings" => 0
},
Expand Down Expand Up @@ -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
);
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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) = @_;
Expand Down
4 changes: 2 additions & 2 deletions cpanfile
Original file line number Diff line number Diff line change
@@ -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";
Expand All @@ -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";
Expand Down
4 changes: 2 additions & 2 deletions lib/WWW/Mechanize.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -3202,7 +3202,7 @@ like to I<systematically> perform the above HTML substitution, you
would overload C<update_html> in a subclass thusly:
package MyMech;
use base 'WWW::Mechanize';
use parent 'WWW::Mechanize';
sub update_html {
my ($self, $html) = @_;
Expand Down
2 changes: 1 addition & 1 deletion t/local/overload.t
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 7c20e57

Please sign in to comment.