Skip to content

Instantly share code, notes, and snippets.

@semifor
Created September 10, 2009 23:07
Show Gist options
  • Save semifor/184899 to your computer and use it in GitHub Desktop.
Save semifor/184899 to your computer and use it in GitHub Desktop.
#!/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 $module =
File::Spec;
# File::Spec::Unix;
# HTML::Entities;
# HTML::Parser;
# HTTP::Date;
# HTTP::Message;
# List::Util;
# LWP;
# LWP::Protocol;
# LWP::UserAgent;
# MRO::Compat;
# namespace::autoclean; # was older
# Scalar::Util;
# URI;
# URI::Escape;
# Variable::Magic; # was older
my @v = (
$module => $module->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