Skip to content

Instantly share code, notes, and snippets.

@rjattrill
Created July 9, 2013 06:40
Show Gist options
  • Save rjattrill/5955171 to your computer and use it in GitHub Desktop.
Save rjattrill/5955171 to your computer and use it in GitHub Desktop.
Data::Dump - warning on dynamic class with '=' in name Can't handle >Table2|t2=HASH data at c:/opt/strawberry/perl/vendor/lib/Data/Dump.pm line 377.
use Test::Most;
use v5.10;
use Data::Dumper;
use Data::Dump qw(dump);
my $dynamic_name = 'Table1|t1<=>Table2|t2';
package Bar {
sub new {
my $class = shift;
bless({}, $class);
}
};
package Table {
sub new {
my $class = shift;
my $class_name = $class . '::' . $dynamic_name;
bless({}, $class_name);
}
}
my $bar = Bar->new();
isa_ok($bar, 'Bar');
my $table = Table->new();
isa_ok($table, "Table::$dynamic_name");
say "table dumper " . Dumper $table;
say "table dump " . dump $table;
done_testing;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment