Advent driven development: The mutable serializer has a couple of class loading bugs. YAML isn't loaded, nor are any serializer classes in configured mapping. Serializers also eat errors, making chasing this down unfriendly.
The simple app below highlights the problem. Both these requests return no output and no errors :(`
curl -H 'text/x-yaml' http://localhost:5000/
curl -H 'text/xml' http://localhost:5000/
#!/usr/bin/env perl
use warnings;
use strict;
{
package Example::App;
use Dancer2;
# Serializer loading bugs
# use YAML;
# use Dancer2::Serializer::XML;
set engines => {
serializer => {
Mutable => {
mapping => {
'text/x-yaml' => 'YAML',
'text/html' => 'YAML',
'text/x-json' => 'JSON',
'application/json' => 'JSON',
'text/xml' => 'XML',
}
}
}
};
set serializer => 'Mutable';
get '/' => sub {
return { some => 'data' };
};
}
Example::App->psgi_app;
Advent driven development: The mutable serializer has a couple of class loading bugs.
YAML
isn't loaded, nor are any serializer classes in configured mapping. Serializers also eat errors, making chasing this down unfriendly.The simple app below highlights the problem. Both these requests return no output and no errors :(`
curl -H 'text/x-yaml' http://localhost:5000/
curl -H 'text/xml' http://localhost:5000/