More tutorial examples
diff --git a/lib/Korap.pm b/lib/Korap.pm
index 311ed48..584d31d 100644
--- a/lib/Korap.pm
+++ b/lib/Korap.pm
@@ -1,5 +1,6 @@
package Korap;
use Mojo::Base 'Mojolicious';
+use Mojo::ByteStream 'b';
our $VERSION = '0.07';
diff --git a/lib/Korap/Plugin/KorapSearch.pm b/lib/Korap/Plugin/KorapSearch.pm
index a65f1f9..115bcb2 100644
--- a/lib/Korap/Plugin/KorapSearch.pm
+++ b/lib/Korap/Plugin/KorapSearch.pm
@@ -163,9 +163,9 @@
for ($c->stash) {
$_->{'search.benchmark'} = $benchmark;
$_->{'search.itemsPerPage'} = $json->{itemsPerPage};
- $_->{'search.timeExceeded'} = (defined $json->{timeExceeded} &&
- $json->{timeExceeded} eq true())
- ? 1 : 0;
+ $_->{'search.timeExceeded'} = ($json->{timeExceeded} &&
+ $json->{timeExceeded}
+ eq Mojo::JSON::true) ? 1 : 0;
$_->{'search.query'} = $json->{request}->{query};
$_->{'search.hits'} = map_matches($json->{matches});
};