This file contains hidden or 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
{ | |
"backend_addr" : "tcp://127.0.0.1:5555", | |
"frontend_addr" : "tcp://127.0.0.1:6666", | |
"publisher_addr" : "tcp://127.0.0.1:7777", | |
"subscriber_addrs" : [ | |
// one for each worker ... | |
"tcp://127.0.0.1:8880" | |
] | |
} |
This file contains hidden or 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
- git update all servers | |
- proxy | |
- app1 | |
- app2 | |
- registration | |
- db | |
- dump-all-databases | |
- dump property-registration separate (just in case) |
This file contains hidden or 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
test |
This file contains hidden or 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 Test::More; | |
use mop; | |
my $Foo = $::Class->new; |
This file contains hidden or 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 Test::More; | |
use Test::Fatal; | |
use Test::Moose; | |
BEGIN { |
This file contains hidden or 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
::Class.meta.add_method('CREATE' => method (%params) { | |
# this just gathers all the | |
# attributes that were defined | |
# for the instances. | |
my %attrs; | |
my Dispatcher $dispatcher = $class.dispatcher(:descendant); | |
for WALKCLASS($dispatcher) -> Class $c { | |
for $c.get_attribute_list() -> $attr { | |
my $attr_obj = $c.get_attribute($attr); | |
%attrs{$attr} = instantiate_attribute_container($attr_obj); |
This file contains hidden or 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
::Class.meta.add_method('BUILDALL' => method (%params) returns Void { | |
my Dispatcher $dispatcher = $self.meta.dispatcher(:descendant); | |
for WALKMETH($dispatcher, 'BUILD') -> Method $method { | |
$method.($?SELF, %params); | |
} | |
}); |
This file contains hidden or 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 ::WALKMETH { | |
my $dispatcher = shift; | |
{ ($dispatcher->() || return)->get_method(@_) || redo } | |
} | |
sub ::WALKCLASS { | |
return $_[0]->(); | |
} |
This file contains hidden or 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
# get the dispatcher instance .... | |
my $dispatcher = $class->dispatcher(':canonical'); | |
# walk the methods | |
my $method = ::WALKMETH($dispatcher, $label, %opts); | |
unless (defined $method) { | |
# if we find an AUTOLOAD anywhere in the chain, then we can use it ... | |
if ($method = ::WALKMETH($class->dispatcher(':canonical'), 'AUTOLOAD', %opts)) { | |
$class->STORE('$AUTOLOAD' => $label); | |
} |
This file contains hidden or 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 Moose; | |
use Class::MOP::Attribute; | |
use Class::MOP::Class; | |
use Data::Dumper; | |
my $ass = Class::MOP::Class->create( | |
'FooBarski' => ( | |
version => '0.01', | |
) | |
); |