Created
September 10, 2009 16:47
-
-
Save semifor/184648 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
# unicode test | |
use strict; | |
use warnings; | |
use feature ':5.10'; | |
use Carp qw/confess/; | |
use Encode qw/decode_utf8/; | |
use Net::Twitter; | |
my $nt = Net::Twitter->new(legacy => 0, netrc => 1); | |
my $hex = '313233c3b6343536373839'; | |
my $decoded = decode_utf8 pack('H*', $hex); | |
my @v = ( | |
$], | |
Net::Twitter->VERSION, | |
JSON::Any->handlerType, | |
JSON::Any->handlerType->VERSION, | |
); | |
eval { | |
$nt->update(qq/@v: $hex => $decoded/); | |
print "success\n"; | |
}; | |
confess $@ if $@; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment