This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
container 'Config' => as { | |
service 'config' => ( | |
lifecycle => "Singleton", | |
class => 'Config::JFDI', | |
dependencies => { | |
name => service( name => "your_app_name" ), | |
path => '/Path/etc', | |
}, | |
); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use 5.010; | |
use Validad::Address::Utils; | |
# rather complex way to connect to DB, setting search_path etc | |
my $schema = Validad::Address::Utils->connect_dbic; | |
my $f1 = $schema->resultset('Ktest')->create({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use Scalar::Util qw(refaddr); | |
use Test::More; | |
use Test::Exception; | |
use KiokuDB; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use Scalar::Util qw(refaddr); | |
use Test::More;use Test::Exception; | |
use KiokuDB; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sub kiokudb_handle { | |
my $self = shift; | |
croak "Can't call kiokudb_handle on unconnected schema" unless ref $self; | |
unless ( $self->{kiokudb_handle} ) { | |
require KiokuDB; | |
require KiokuDB::Backend::DBI; | |
my $dir = KiokuDB->new( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use 5.016; | |
use Plack::Runner qw(); | |
use ZMQ::LibZMQ3; | |
use ZMQ::Constants qw(ZMQ_PUB); | |
my $context = zmq_init(); | |
my $publisher = zmq_socket($context, ZMQ_PUB); | |
zmq_bind($publisher, 'tcp://*:5556'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use 5.016; | |
use AnyEvent; | |
use ZMQ::LibZMQ3; | |
use ZMQ::Constants qw(ZMQ_SUB ZMQ_SUBSCRIBE ZMQ_RCVMORE ZMQ_FD); | |
my $context = zmq_init(); | |
my $subscriber = zmq_socket($context, ZMQ_SUB); | |
zmq_connect($subscriber, 'tcp://localhost:5556'); | |
zmq_setsockopt($subscriber, ZMQ_SUBSCRIBE, 'request'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use 5.016; | |
use ZMQ::LibZMQ3; | |
use ZMQ::Constants qw(ZMQ_SUB ZMQ_SUBSCRIBE ZMQ_POLLIN); | |
my $context = zmq_init(); | |
my $subscriber = zmq_socket($context, ZMQ_SUB); | |
zmq_connect($subscriber, 'tcp://localhost:5556'); | |
zmq_setsockopt($subscriber, ZMQ_SUBSCRIBE, 'request'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From eeeadd16dcfaa7977dfba9a1ba07ac7708ad16f0 Mon Sep 17 00:00:00 2001 | |
From: Thomas Klausner <domm@plix.at> | |
Date: Thu, 30 May 2013 11:10:30 +0200 | |
Subject: [PATCH] fixed usage of "no if .. warnings" in perldelta | |
--- | |
pod/perl5180delta.pod | 2 +- | |
1 file changed, 1 insertion(+), 1 deletion(-) | |
diff --git a/pod/perl5180delta.pod b/pod/perl5180delta.pod |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use 5.18.1; | |
use mop; | |
class Foo {}; | |
mop::meta('Foo')->add_method(mop::method->new(name=>'bar',body=>sub { say "bar"})); | |
my $foo = Foo->new; | |
$foo->bar; |