diff --git a/src/main/perl/lib/Test2/Compare/Negatable.pm b/src/main/perl/lib/Test2/Compare/Negatable.pm index 1cb49c3ac6..ab5b5d5a62 100644 --- a/src/main/perl/lib/Test2/Compare/Negatable.pm +++ b/src/main/perl/lib/Test2/Compare/Negatable.pm @@ -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; }