Skip to content

Instantly share code, notes, and snippets.

Benjamin Trott btrott

  • Maven
  • San Francisco, CA
Block or report user

Report or block btrott

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:346587
diff --git a/lib/WWW/ b/lib/WWW/
index a9ca6a3..4433d7c 100644
--- a/lib/WWW/
+++ b/lib/WWW/
@@ -5,6 +5,9 @@ use 5.008_001;
our $VERSION = '0.009_01';
use Any::Moose;
+use Carp qw( croak );
+use HTTP::Request::Common;
View gist:314967
#!/usr/bin/perl -w
use strict;
use Plack::Builder;
use Plack::Request;
use Plack::Response;
use Text::MicroTemplate qw( render_mt );
use WWW::TypePad;
# These should be set to the Consumer Key and Consumer Secret
View gist:236452
sub get_best_avatar_uri {
my $class = shift;
my( $links ) = @_;
return unless $links && @$links;
# Look first for a 50px width avatar...
my $link = first { $_->{rel} eq 'avatar' && $_->{width} == 50 } @$links;
# ... and if we can't find one, grab the largest available avatar,
# which will by definition be less than 50px width, I think?
You can’t perform that action at this time.