The web in a box - a next generation web framework for the Perl programming language

IRC log for #mojo, 2017-05-13

| Channels | #mojo index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:17 jabberwok joined #mojo
01:00 NiggerAlert joined #mojo
01:00 NiggerAlert http://imgur.com/LLwrAiu
01:01 NiggerAlert http://imgur.com/LLwrAiu
01:01 Grinnz left #mojo
01:01 Grinnz joined #mojo
01:02 NiggerAlert was kicked by Grinnz: NiggerAlert
01:02 Grinnz keep forgetting irccloud's /kickban does the wrong banmask :/
01:43 maschine joined #mojo
01:48 ilbot2 joined #mojo
01:48 Topic for #mojo is now ūüć© nom nom | http://mojolicious.org | http://irclog.mojolicious.org | http://code-of-conduct.mojolicious.org
02:15 noganex joined #mojo
03:37 VVelox joined #mojo
03:54 PryMar56 joined #mojo
06:06 aborazmeh joined #mojo
06:30 dod joined #mojo
06:36 dod joined #mojo
06:48 stryx` joined #mojo
07:01 Lee joined #mojo
07:49 dod joined #mojo
07:51 Vandal joined #mojo
07:57 sh14 joined #mojo
08:21 ladnaV joined #mojo
08:41 kes joined #mojo
08:41 kes Why Mojo do not check input values?
08:41 kes [error] Can't call method "mtime" on an undefined value at /usr/local/lib/perl5/site_perl/5.20.3/Mojolicious/Static.pm line 96.
08:42 kes $c->reply->asset( undef )
09:15 Phil21 joined #mojo
09:16 Phil21 joined #mojo
09:17 Phil21 joined #mojo
09:28 pink_mist kes: too much overhead for too little gain - the error you got there is quite clear that it tried to do things on an undefined value
09:32 kes ok
09:37 aborazmeh joined #mojo
09:50 Vandal joined #mojo
09:55 Phil21 joined #mojo
10:40 salv0 joined #mojo
10:46 punter joined #mojo
11:01 stryx` joined #mojo
11:48 dod joined #mojo
12:01 ladnaV joined #mojo
12:09 Armen joined #mojo
12:09 perlpilot joined #mojo
12:10 bc547 joined #mojo
12:10 dustinm joined #mojo
12:10 Vandal joined #mojo
12:17 Lee joined #mojo
12:44 kes joined #mojo
12:51 skycarl joined #mojo
13:07 ladnaV joined #mojo
13:33 kaare_ joined #mojo
13:38 maschine joined #mojo
14:09 Vandal joined #mojo
14:28 sh14 joined #mojo
14:47 kaare_ joined #mojo
15:01 marcus heh
15:08 sri btw. me bringing up LIMIT/OFFSET support for SQL::Abstract in #dbix-class resulted in total silence
15:10 sri i don't really think the project has a future, if we want more for the mojolicious model layer we'll have to do it ourselves
15:20 ribasushi given the channel's desires for SQLA (pg-orientation) - I concur that a subclass or outright fork is definitely the best way forward for your ecosystem
15:31 sri it's now on top of my list for next suse hackweek
15:33 PryMar56 joined #mojo
15:42 kaare joined #mojo
15:42 cheako joined #mojo
15:54 ladnaV joined #mojo
16:27 dod joined #mojo
16:37 Vandal joined #mojo
17:12 stryx` joined #mojo
17:13 punter joined #mojo
17:33 disputin joined #mojo
17:40 gryphon joined #mojo
17:46 disputin1 joined #mojo
17:46 disputin2 joined #mojo
17:58 ladnaV joined #mojo
19:20 keret joined #mojo
19:22 keret Hi there! I'm trying to use DBIx::Connector with Mojolicious::Lite, but for some reason, right after creating a instance of it in my model class, my code is going straight to the DESTROY block on DBIx::Connector and all I'm getting is a undef returned. If I test the same code outside Mojolicious::Lite, things works as expected
19:22 kaare joined #mojo
19:26 keret Does anybody have experimented such problem? I can share the code snippet if necessary
19:26 sri see how Mojo:Pg is used, and do the same
19:27 keret oh, I'm using mysql, not PostgreSQL
19:30 genio show us how you're creating it.  gist or some other pastebot
19:32 keret http://mibpaste.com/p8dl4i
19:33 keret After executed with morbo:
19:33 keret $ morbo bin/test  Server available at http://127.0.0.1:3000 Can't load application from file "/home/alceu/Projetos/cpantesters-web/bin/test": Can't call method "mode" on an undefined value at /home/alceu/Projetos/cpantesters-web/bin/test line 20. Compilation failed in require at (eval 91) line 1.
19:36 keret as soon as the new method from DBIx::Connector returns, it goes straight to DESTROY block... not sure why. I tried to change DBIx::Connector new method to be more verbose and used isweak from Scalar::Util before returning the blessed reference... got nothing wrong from there
19:37 genio instead of my $conn = DBIx::Connector->new()...    helper conn => sub { state $conn = DBIx::Connector->new(...) };
19:38 keret ok, let me try...
19:39 genio Then, in your controller,   $c->conn->run(fixup => sub{});
19:46 Grinnz "my $conn => DBIx::Connector" should be "my $conn = DBIx::Connector"
19:46 Grinnz lol
19:46 Grinnz but also, you're missing app->start; at the end of the app
19:46 keret I got that... but not being able to use "state" even after doing CORE::state
19:47 Grinnz Mojolicious::Lite should set that feature
19:47 Grinnz regardless, for a single file app it doesnt make much difference whether $conn is just a globally visible lexical or whether it's accessed via a helper
19:48 Grinnz the latter is usually more convenient though, and you don't need state to do it
19:48 Grinnz as long as you scope it outside the helper sub
19:49 keret http://mibpaste.com/4BAK3Z
19:50 keret still getting the same error "Can't call method "conn" on an undefined value at /home/alceu/Projetos/cpantesters-web/bin/test line 29."
19:51 sri perhaps use Mojo::mysql, the module is not nearly as good as Mojo::Pg/SQLite, but better than raw DBIx::Connector
19:51 keret let me try without the helper again
19:52 keret same thing...
19:52 sri yes, the code is wrong
19:52 genio my $c => shift;  is wrong.    my $c = shift;
19:52 genio helper with state too
19:52 sri i'm just recommending the alternative because the docs are better
19:53 keret yep, that fixed
19:53 sri those modules include example apps
19:53 maschine using a helper makes things way cleaner too
19:54 keret http://mibpaste.com/p049TQ
19:55 keret I'm not considering Mojo::mysql since I really don't need asynchronous call to the DB
19:56 sri it does much more
19:57 zivester joined #mojo
19:58 keret http://mibpaste.com/KBLaGz
19:59 keret I was able to retrieve data from the DB too.
19:59 keret but Mojolicious::Lite is not enabling "state"
19:59 keret I'm using "my" in the last updatged pastebin
19:59 keret updated*
20:02 keret Just checked http://mojolicious.org/perldoc/Mojolicious#helper... why do I need to use a helper anyway?
20:03 keret http://mibpaste.com/dkZCng
20:04 keret I'm sorry, state DOES work... I don't know what happened in my first attempt
20:23 Lee joined #mojo
22:01 eseyman joined #mojo
23:36 Phil21_ joined #mojo
23:38 Phil21_ joined #mojo
23:41 Phil21_ joined #mojo
23:43 Phil21_ joined #mojo
23:45 Phil21_ joined #mojo
23:52 Phil21 joined #mojo

| Channels | #mojo index | Today | | Search | Google Search | Plain-Text | summary