I'm a Research Software Engineer at the Leibniz Institute for the German Language.
- โ Perl, Go, Javascript
- ๐ Search Engine Technology
- ๐ญ Finite State Technology
Visit me at https://www.nils-diewald.de
Use CHI caches within Mojolicious
License: Artistic License 2.0
I'm a Research Software Engineer at the Leibniz Institute for the German Language.
Visit me at https://www.nils-diewald.de
My smokers started to report the following failure:
# Failed test 'Namespace is set'
# at t/CHI-Command.t line 40.
# got: 'Mojolicious::Command::Author'
# expected: 'Mojolicious::Command'
# Failed test 'Namespace is set only once'
# at t/CHI-Command.t line 105.
# got: 'Mojolicious::Command::Author'
# expected: 'Mojolicious::Command'
# Looks like you failed 2 tests of 59.
t/CHI-Command.t ...
Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/59 subtests
Statistical analysis suggests that this happens with the newest Mojolicious, version 8.01 (@kraih FYI):
****************************************************************
Regression 'mod:Mojolicious'
****************************************************************
Name Theta StdErr T-stat
[0='const'] 1.0000 0.0000 4076546229700720.50
[1='eq_7.33'] -0.0000 0.0000 -1.01
[2='eq_7.46'] -0.0000 0.0000 -0.96
[3='eq_7.55'] -0.0000 0.0000 -0.48
[4='eq_7.58'] -0.0000 0.0000 -0.18
[5='eq_7.70'] 0.0000 0.0000 0.18
[6='eq_7.71'] 0.0000 0.0000 0.00
[7='eq_7.82'] -0.0000 0.0000 -1.12
[8='eq_7.85'] -0.0000 0.0000 -0.80
[9='eq_7.88'] -0.0000 0.0000 -0.21
[10='eq_7.93'] 0.0000 0.0000 0.45
[11='eq_7.94'] 0.0000 0.0000 0.44
[12='eq_8.0'] 0.0000 0.0000 0.44
[13='eq_8.01'] -1.0000 0.0000 -4021080431197625.00
R^2= 1.000, N= 125, K= 14
****************************************************************
EDIT: See my second entry below for a clear and minimal example of the bug!
Hello,
is there any experience using Mojolicious::Plugin::CHI
with Starman
?
We have an issue at http://perlybook.org where we are trying to replace CHI
with Mojolicious::Plugin::CHI
The error is described here: reneeb/cpan2ebook#27
It works all fine when running perl -Ilib $myscript daemon
but breaks if started like starman $myscript
.
Hello,
I've been tying to use your plugin, but i get this error :
missing required param 'driver' or 'driver_class' at ~/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/Mojolicious/Plugin/CHI.pm line 62.
i've tried with perl 5.14 and 5.20, CHI 0.50 and 0.58
I have no clue of what i'm doing wrong...
My init is like this
$self->plugin( CHI => {
ISPCache => {
driver => 'File',
root_dir => '/path/to/cache',
namespace => 'ISPCache'
},
});
$self->helper( cache_put => sub {
my ($key, $data) = @_;
$self->chi('ISPCache')->set($key => $data);
});
$self->helper( cache_get => sub {
my $key = shift;
return $self->chi('ISPCache')->get($key);
});
Hello,
I'm trying to make this plugin work since quite some hours (for perlybook.org) but I keep on failing.
No clue what I'm doing wrong or if this is a bug?
In the main App I do something like this:
$self->plugin(CHI => {
cpan2ebook => {
driver => 'File',
root_dir => 'home/bo/tmp',
}
});
And in the Controller something like this:
$self->chi('cpan2ebook')->set("KEY", "DATA");
Now when I do this, nothing gets created in "/home/bo/tmp".
Before the above case I tried a variant where I pass the ref to a sub.
# abstract pseudo code
sub my_cache_wrapper_sub {
my $cache = shift;
$cache->set("KEY", "DATA");
}
my_cache_wrapper_sub( $self->chi('cpan2ebook') );
In this case it did create the cache, but as "Default" instead of "cpan2ebook".
So in short: I have not been able to achieve anything working as suspected.
Can anybody give me a hint out of my examples, or even try if it runs for him?
Is the module already capable of this stuff?
Maybe I have some weird typo somewhere but before I continue searching for hours it would be great if somebody can give some feedback on this, if possible.
Thanks a lot.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.