Skip to content
Merged
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
12 changes: 0 additions & 12 deletions src/main/perl/lib/Test2/Compare/Negatable.pm
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,6 @@ sub { overload->import('!' => 'clone_negate', fallback => 1); Test2::Util::HashB
$sub->();

no strict 'refs';
no warnings 'once';
# The HashBase import above runs through an eval-created helper so its
# generated methods can land in the consumer package. The interpreter can
# miss those generated symbols while compiling subsequent methods that use
# the NEGATE constant. Install the role's small attribute API directly as
# a fallback, before the consumer continues compiling.
*{"$pkg\::NEGATE"} = sub () { 'negate' }
unless defined &{"$pkg\::NEGATE"};
*{"$pkg\::negate"} = sub { $_[0]->{'negate'} }
unless defined &{"$pkg\::negate"};
*{"$pkg\::set_negate"} = sub { $_[0]->{'negate'} = $_[1] }
unless defined &{"$pkg\::set_negate"};
*{"$pkg\::clone_negate"} = \&clone_negate;
*{"$pkg\::toggle_negate"} = \&toggle_negate;
}
Expand Down
Loading