Browse Source

Dancer: use JSON::XS for faster serialization

Dancer: ensure that the Dancer serializer will be able to use the fast JSON implementation (JSON::XS) by loading explicitely JSON::XS: if the fast implementation is not available, the app will now fail at startup.
Olivier Mengué 11 years ago
parent
commit
4c77831155
1 changed files with 1 additions and 0 deletions
  1. 1 0
      dancer/app.pl

+ 1 - 0
dancer/app.pl

@@ -4,6 +4,7 @@ use warnings;
 
 
 use Dancer ':syntax';
 use Dancer ':syntax';
 use DBI;
 use DBI;
+use JSON::XS;  # Ensure that the fast implementation of the serializer is installed
 
 
 set serializer => 'JSON';
 set serializer => 'JSON';