Skip to content

Commit

Permalink
avoid once warnings when assigning EXPORT* vars
Browse files Browse the repository at this point in the history
Normally, the EXPORT* vars will be immune to 'once' warnings.  In perl
5.25.6, EXPORT_TAGS lost its immunity to the warning.  While that will
most likely be fixed, we can just be safe and stop relying on having
that special cased.
  • Loading branch information
haarg authored and Arthur Axel 'fREW' Schmidt committed Oct 21, 2016
1 parent 234e0f6 commit 7246ed9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
Revision history for {{$dist->name}}

{{$NEXT}}
- Avoid possible warnings about special variables only being used once
(Graham Knop)

0.001012 2016-08-23 11:18:21-07:00 America/Los_Angeles
- Many small performance improvements (Peter Rabbitson)
Expand Down
1 change: 1 addition & 0 deletions lib/Sub/Exporter/Progressive.pm
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ sub import {

my $full_exporter;
no strict 'refs';
no warnings 'once';
@{"${inner_target}::EXPORT_OK"} = @{$export_data->{exports}};
@{"${inner_target}::EXPORT"} = @{$export_data->{defaults}};
%{"${inner_target}::EXPORT_TAGS"} = %{$export_data->{tags}};
Expand Down

0 comments on commit 7246ed9

Please sign in to comment.