The Room Do I dare disturb the universe?

Something New

Something New

I wrote a little program tonight that takes input from STDIN and posts to this blog using Net::Blogger (obviously if you’re reading this it worked). Because it reads from STDIN it works nicely with TextMate. W00t. Here’s the text of the script (posted using: cat which blog | mate | blog –title “Something New”) #!/usr/bin/perl use strict; use warnings; use version; our $VERSION = qv(“1.0.0”); use Carp; use Config::Auto; use Getopt::Long; use Net::Blogger

$Config::Auto::Untaint = 1;
my %conf = %{ Config::Auto::parse( '.blogrc', format => "yaml" ) };
my %opt;
$opt{sitename} ||= $conf{default};
%opt = ( %{ $conf{ $opt{sitename} } }, %opt);
{ local $/; $opt{postbody} = <> }

my $mt = Net::Blogger->new(engine=>$opt{type});

my $id = $mt->metaWeblog()
			) || croak $mt->LastError();