GithubHelp home page GithubHelp logo

mojolicious-plugin-chi's Introduction

Hi! I'm Akron. ๐Ÿ‘‹

I'm a Research Software Engineer at the Leibniz Institute for the German Language.

My Interests

  • โš™ Perl, Go, Javascript
  • ๐Ÿ”Ž Search Engine Technology
  • ๐Ÿ”ญ Finite State Technology

Visit me at https://www.nils-diewald.de

mojolicious-plugin-chi's People

Contributors

akron avatar borisdaeppen avatar manwar avatar rouzier avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

mojolicious-plugin-chi's Issues

t/CHI-Command.t started to fail (with Mojolicious 8.01?)

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
****************************************************************

Plugin not working with "Starman"

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.

missing required param 'driver' or 'driver_class' at CHI.pm Line 62

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);
  });

Namespace is always "Default"

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.