Skip to content

Instantly share code, notes, and snippets.

my %args = (
foo => 'bar',
(do {
if ($answer == 42) { answer => $answer }
elsif ($answer) { wrong_answer => 1 }
else { no_anwser => 1 }
}),
);
my %args = (
foo => 'bar',
(cond(
($answer == 42) { answer => $answer }
($answer) { wrong_answer => 1 }
(otherwise) { no_anwser => 1 }
)),
);
-module(mydemo_resource).
-export([init/1, to_html/2]).
-include_lib("webmachine/include/webmachine.hrl").
init(Config) ->
{ok, undefined}.
to_html(ReqData, State) ->
{"<html><body>Hello, new world</body></html>", ReqData, State}.
@stevan
stevan / oslo.pm-moose-hackathon-info.mkd
Created March 30, 2012 18:21 — forked from sjn/oslo.pm-moose-hackathon-info.mkd
Moving to Moose 2012 hackathon status

Moving to Moose hackathon 2012

Oslo Perl Mongers would like to invite to a Moving to Moose double-hackathon near Stavanger, Norway! We're planning four full days of hacking, discussion and fun at the Preikestolen Fjellstue conference hotel. And if the weather allows it, we'll do a 5+5km hike to Preikestolen and back!

The hackathon topic is two-fold: Getting a proper Meta Object Protocol into Perl5 core, and moving CPAN modules to Moose. We're specifically inviting two communities - the #p5-mop and #perlrdf crowds.

With that said, the hackathon is also open for others! We intend on allowing commercial attendees too, and hope the high-bandwith discussions, hacking and networking will function as a great door-opener for anyone who wants to become part of the Perl community.

The #perlrdf Moose hackathon

@stevan
stevan / oslo.pm-moose-hackathon-info.mkd
Created May 5, 2012 13:15 — forked from sjn/oslo.pm-moose-hackathon-info.mkd
Moving to Moose 2012 hackathon status

Moving to Moose hackathon 2012

Oslo Perl Mongers would like to invite to a Moving to Moose double-hackathon near Stavanger, Norway! We're planning four full days of hacking, discussion and fun at the Preikestolen Fjellstue conference hotel. And if the weather allows it, we'll do a 5+5km hike to Preikestolen and back!

The hackathon topic is two-fold: Getting a proper Meta Object Protocol into Perl5 core, and moving CPAN modules to Moose. We're specifically inviting two communities - the #p5-mop and #perlrdf crowds.

With that said, the hackathon is also open for others! We intend on allowing commercial attendees too, and hope the high-bandwith discussions, hacking and networking will function as a great door-opener for anyone who wants to become part of the Perl community.

The #perlrdf Moose hackathon

@stevan
stevan / oslo.pm-moose-hackathon-info.mkd
Created May 5, 2012 14:59 — forked from sjn/oslo.pm-moose-hackathon-info.mkd
Moving to Moose 2012 hackathon status

Moving to Moose hackathon 2012

Oslo Perl Mongers would like to invite to a Moving to Moose double-hackathon near Stavanger, Norway! We're planning four full days of hacking, discussion and fun at the Preikestolen Fjellstue conference hotel. And if the weather allows it, we'll do a 5+5km hike to Preikestolen and back!

The hackathon topic is two-fold: Getting a proper Meta Object Protocol into Perl5 core, and moving CPAN modules to Moose. We're specifically inviting two communities - the #p5-mop and #perlrdf crowds.

With that said, the hackathon is also open for others! We intend on allowing commercial attendees too, and hope the high-bandwith discussions, hacking and networking will function as a great door-opener for anyone who wants to become part of the Perl community.

The #perlrdf Moose hackathon

Have REST-ful Holidays

Your boss comes to you the day after Thanksgiving vacation (or if you're in Scotland, the day after St. Andrew's Bank Holiday. If you're not in Scotland or the US, adjust accordingly).

Boss: We need a Web API for the Flibber data. I want it to be REST-ful.
#!/usr/bin/env perl
use v5.16;
use Bread::Board;
use Data::Dumper;
{
package OurApp::ServiceDiscovery;
use Moose::Role;
@stevan
stevan / sloc.pl
Last active November 18, 2015 15:56
#!perl
use v5.20;
use warnings;
use Path::Class qw[ file ];
use PPI;
use PPI::Document;
use PPI::Dumper;
#!perl
use strict;
use warnings;
use Test::More;
use Data::Dumper;
=pod