Skip to content

Instantly share code, notes, and snippets.

View monken's full-sized avatar

Moritz Onken monken

View GitHub Profile
use Moose;

Moose Hackathon Agenda

This is a list of topics/ideas/wishes/dreams that we will discuss during the Moose hackathon at YAPC::NA this year. They are in no particular order, nor does inclusion of this list imply any type of endorsement of the idea, these are just ideas, so please feel free to add yours in.


  • Traits/Roles in Class::MOP
    • A low-level trait/role type primitive
  • removing Test::Exception from Moose/MOP
$form->populate( {
auto_fieldset => { id => 'fs_login_form' },
elements => [
{ type => 'Block', tag => 'dl', elements => [
{ type => 'Block', content => 'Username', tag => 'dt' },
{ type => 'Block', tag => 'dd', elements =>
{ type => 'Text',
name => 'login_login',
constraints => [qw|Required|],
package Foo;
use Moose;
use Test::More;
has foo => ( is => 'rw', lazy => 1, predicate => 'has_foo', default => 1 );
my $foo = new Foo;
ok($foo->has_foo); # fail
ok($foo->meta->get_attribute('foo')->has_value($foo)); # fail
ok($foo->foo); # ok
ok($foo->has_foo); # ok
encode_json(
{ query => { term => { name => $module } },
size => 1,
sort => { date => { reverse => \1 } }
} );
{
"release" : {
"_source" : {
"compress" : true
},
"properties" : {
"abstract" : {
"type" : "multi_field",
"fields" : {
"raw" : {
{
"took" : 1,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"failed" : 0
},
"hits" : {
"total" : 2,
# this doesn't work
curl -XDELETE http://localhost:9200/cpan
curl -XPUT http://localhost:9200/cpan -d '
{"analysis":{"analyzer":{"lowercase":{"filter":"lowercase","tokenizer":"keyword"}}},
"mappings":{"twitter":{"properties":{"name":{"type":"string","analyzer":"lowercase"}}}}}
'
# while this does:
curl -XDELETE http://localhost:9200/test/;
curl -XPUT http://localhost:9200/test/;
curl -XPUT http://localhost:9200/test/foo/_mapping -d '
{
"tweet" : {
"properties" : {
"message" : {"type" : "string", "store" : "yes"}
}
{
"cpan" : {
"dependency" : {
"_source" : {
"compress" : true
},
"properties" : {
"relationship" : {
"index" : "not_analyzed",
"store" : "yes",