Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Corion/exporter inheritance #155

Merged
merged 3 commits into from
May 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
Revision history for HTTP-Message

{{$NEXT}}
- Don't inherit from Exporter anymore (Max Maischein)
- Remove superfluous Perl version requirement. This module requires
Perl 5.6 or newer. (Max Maischein)

6.29 2021-03-06 04:50:34Z
- fix issue with HTTP::Request internal cache for canonical url when using
Expand Down
2 changes: 1 addition & 1 deletion lib/HTTP/Headers/Util.pm
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use warnings;

our $VERSION = '6.30';

use base 'Exporter';
use Exporter 5.57 'import';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a style question here. I know in our other LWP things we tend to:

use Foo::Bar qw(thing_to_import);

https://github.com/libwww-perl/libwww-perl/blob/master/lib/LWP/UserAgent.pm#L16 for example.

Since we already have the version required for Exporter in our build, should this instead be

use Exporter qw(import);

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, that would be in line with other uses. I can occasionally run https://metacpan.org/pod/perlimports on the repo to enforce style. That will rewrite imports. It will preserve the version number, though.


our @EXPORT_OK=qw(split_header_words _split_header_words join_header_words);

Expand Down
3 changes: 1 addition & 2 deletions lib/HTTP/Status.pm
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ use warnings;

our $VERSION = '6.30';

require 5.002; # because we use prototypes
use Exporter 5.57 'import';

use base 'Exporter';
our @EXPORT = qw(is_info is_success is_redirect is_error status_message);
our @EXPORT_OK = qw(is_client_error is_server_error is_cacheable_by_default);

Expand Down