in reply to socio-political guidance sought
no warnings 'redefine'; if ($Data::Dumper::VERSION < NEXT_VERSION) { *Data::Dumper::some_method = sub { # replacement code here }; }
The upside here is that only users of your module will see the new Data::Dumper behavior, and you can document it in your module. The downside is that if Data::Dumper doesn't get your patch by NEXT_VERSION then you'll need to change your module to take it working.
All that said, I think you should probably take a step back here. Are you sure you need to change Data::Dumper? It's an old and rather stable module. If it doesn't do what you want maybe you need to sub-class it or replace it with something more suited to your needs.
-sam
|
|---|