Skip to content

Instantly share code, notes, and snippets.

@syachi
Last active August 29, 2015 13:56
Show Gist options
  • Save syachi/9263900 to your computer and use it in GitHub Desktop.
Save syachi/9263900 to your computer and use it in GitHub Desktop.
Data::DumperでUTF-8を表示させる
package Dumper;
use utf8;
use base 'Exporter';
our @EXPORT = qw/Dumper/;
use Data::Dumper;
no warnings 'redefine';
sub Dumper
{
my $dump = Data::Dumper::Dumper(@_);
$dump =~ s/\\x\{([0-9A-Za-z]{4})\}/pack('U',hex($1))/ge;
$dump;
}
1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment