$ perl -MData::Dump::Streamer -MYAML -le ' Data::Dump::Streamer::Dump( + \*Dump ) ' $GLOB1 = \*::Dump; *::Dump = sub { package YAML; use warnings; use strict 'refs'; my $yaml = 'YAML'->new; $yaml->dumper_class($DumperClass) if $DumperClass; return $yaml->dumper_object->dump(@_); }; $ perl -MData::Dump::Streamer -mYAML -le ' Data::Dump::Streamer::Dump( + \*Dump ) ' $GLOB1 = \*::Dump; *::Dump = sub { package Data::Dump::Streamer; use warnings; use strict 'refs'; my $obj; if (blessed($_[0]) and blessed($_[0]) eq 'Data::Dump::Stre +amer') { $obj = shift @_; } if (@_) { if (defined wantarray and not wantarray) { $obj ||= 'Data::Dump::Streamer'->new; $obj->_make_args(@_); return $obj; } else { $obj ||= 'Data::Dump::Streamer'; return $obj->Data(@_)->Out; } } else { if ($obj) { return $obj->Out; } else { return 'Data::Dump::Streamer'->new; } } }; $ pmvers Data::Dump::Streamer YAML Exporter Data::Dump::Streamer: 2.09 YAML: 0.70 Exporter: 5.63
In reply to Exporter collision detection by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |