Skip to content

Instantly share code, notes, and snippets.

View benvanstaveren's full-sized avatar

Ben van Staveren benvanstaveren

View GitHub Profile
print('key is: ', $key, "\n") for(keys(%hash));
print "key is: $_" for keys %hash;
foreach my $key keys %hash {
print "key is: $key\n";
}
@benvanstaveren
benvanstaveren / DisqusBridge.pl
Created April 22, 2011 01:05
A little example for using Mojolicious::Lite, Mojolicious::Plugin::Disqus and Net::Disqus
#!/usr/bin/env perl
use Mojolicious::Lite;
use Try::Tiny;
plugin 'disqus', { 'api_secret' => 'getyourownsecretplease', pass_api_errors => 1 };
# This, of course, is total and utter overkill for something like this,
# but I figured if I'm going to write demonstration code, might as well
# go the whole hog.
plugin 'mongodb', { 'database' => 'disqusbridge' };