Camelia, the Perl 6 bug

IRC log for #mojo, 2012-12-17

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

All times shown according to UTC.

Time Nick Message
00:15 Molaf__ joined #mojo
00:20 Miked joined #mojo
00:37 Averna joined #mojo
00:54 Averna joined #mojo
01:01 laouji joined #mojo
01:13 Mike-PerlRecruiter_ joined #mojo
01:14 d4rkie joined #mojo
01:33 zz_tokuhirom joined #mojo
02:21 Skolem Is it possible to somehow cache DB connections across client requests with Mojolicious?
02:36 keedi joined #mojo
02:56 rwstauner Skolem: https://metacpan.org/module/M​ojolicious::Plugin::Database ?
02:56 rwstauner Though using DBIx::Connector might be even easier
02:57 rwstauner depends on your app i suppose
03:00 Skolem thanks!!
03:34 egopro joined #mojo
03:45 noganex_ joined #mojo
04:30 Foxcool_ joined #mojo
05:00 laouji joined #mojo
05:39 spleenjack joined #mojo
05:54 asarch joined #mojo
06:00 zivester joined #mojo
06:31 spleenjack joined #mojo
06:35 spleenjack1 joined #mojo
06:37 ver joined #mojo
06:39 spleenjack2 joined #mojo
06:43 anewkirk here's something I could'nt find in the Cookbook
06:43 anewkirk ... how to make internal requests for resources
06:44 anewkirk I'm trying to create an HMVC pattern
06:45 anewkirk .. and I'd like to make requests internally during development
06:46 egopro joined #mojo
06:49 egopro joined #mojo
06:58 crab internal requests for resources?
07:00 anewkirk yeah
07:01 anewkirk so basically the HMVC pattern is hierarchal internal requests
07:01 anewkirk maybe e.g. ...
07:01 anewkirk sub action { return $self->sub_request(put => '/api/foo/bar') }
07:02 anewkirk more or less
07:03 crab strange
07:03 anewkirk why?
07:09 anewkirk okay, cool cool cool
07:09 anewkirk http://paste.scsys.co.uk/219211
07:09 anewkirk got something to work with at-least
07:24 yakudza joined #mojo
07:43 Vandal joined #mojo
08:21 dod joined #mojo
08:39 dod joined #mojo
09:04 fhelmber_ joined #mojo
09:15 jhthorsen_ joined #mojo
09:22 jhthorsen_ joined #mojo
09:22 wircus joined #mojo
09:23 D4RK-PH0ENiX joined #mojo
09:40 memowe \o/
09:41 judofyr joined #mojo
09:45 wircus chansen: I still think I have some issues.
09:49 d4rkie joined #mojo
09:57 cosmincx joined #mojo
10:00 Averna joined #mojo
10:02 alexeiras joined #mojo
10:11 SmokeMachine joined #mojo
10:23 jhthorsen_ joined #mojo
10:23 wircus joined #mojo
10:46 dod1 joined #mojo
10:57 dpetrov_ joined #mojo
10:57 egopro joined #mojo
11:05 d4rkie joined #mojo
11:09 Miked joined #mojo
11:38 dotan joined #mojo
11:40 ryozi joined #mojo
11:44 egopro joined #mojo
11:48 egopro joined #mojo
11:53 mire joined #mojo
11:56 dod joined #mojo
12:08 ObseLeTe joined #mojo
12:37 Molaf_ joined #mojo
13:02 egopro joined #mojo
13:04 egopro_ joined #mojo
13:13 Mike-PerlRecruiter_ joined #mojo
13:23 b2b joined #mojo
13:23 bjoernfan In my MyApp.pm I've got has dbh => { ... }. One way I use this is from a command, MyApp::DB::Foo->new($self->app->dbh);. This works well. Now I wanted to write a test for my command, so I did my $command = MyApp::Command::add->new;, $command->run('param'); -- but running this test fails with this:
13:23 bjoernfan Can't locate object method "dbh" via package "Mojolicious::Lite" at lib//MyApp/Command/add.pm
13:23 bjoernfan Thoughts?
13:39 bjoernfan I'm not using ::Lite btw, even if it mentions that there.
13:44 Miked joined #mojo
13:58 rem_lex|pivo joined #mojo
14:11 batman bjoernfan: you got sub {} right? ..not just {}
14:11 bjoernfan Yeah, sorry.
14:13 batman it's weird that it complains about Mojolicious::Lite, when you're constructing a MyApp::Command::add object
14:13 batman i'm guessing you're not doing what you're telling us
14:13 batman after all... is your app called MyApp?
14:13 bjoernfan There is a slight risk I might be abusing model/database connections and stuff, I'm not sure. But anyway, it works great as a command.
14:14 batman are you sure you want new($dbh) and not new(dbh => $dbh) ?
14:14 batman also, what does diag $command say? what kind of object is it?
14:15 bjoernfan Nah, I'd share all the code if I could, but I'm not really at liberty.
14:16 bjoernfan Hmm... I could rewrite this part later though, to test it.
14:17 batman what if you do my $app = MyApp->new; and isa_ok($app->dbh, 'DBI::db'); ?
14:17 bjoernfan It's not the ($dbh)/dbh =>-thing, I don't think it would work as a command if that was it.
14:18 bjoernfan I'll check!
14:19 batman i don't think you're creating a MyApp::Command::add object...
14:23 GabrielVieira joined #mojo
14:25 gryphon joined #mojo
14:28 asarch joined #mojo
14:29 bjoernfan The isa_ok test passed, but I'm not doing any use MyApp in my test. I'm just doing use MyApp::Command::add directly, and creating an object out of that, and I'm guessing that bypasses the "has dbh"-stuff.
14:31 bjoernfan No, can't be right...
14:32 batman what about $command->app->dbh ?
14:34 bjoernfan What would you expect $command->app to be, for starters?
14:34 batman MyApp
14:35 bjoernfan It's Mojolicious::Lite, and dbh can't be located.
14:35 bjoernfan When running it from a test as ./script/myapp test ./t/foo.t
14:36 batman then i think you need to do Myapp::Command::add->new(app => MyApp->new);
14:37 bjoernfan All tests successful.
14:37 batman sweet!
14:38 bjoernfan But this has got to be a bug, right?
14:39 mire joined #mojo
14:39 batman i don't think so. the reason why script/my_app works is that ->start looks at $ENV{MOJO_APP}
14:39 inokenty joined #mojo
14:40 bjoernfan hmm
14:43 bjoernfan Well, I'm happy for now. :)
14:43 bjoernfan Thanks!
14:43 batman :)
14:44 bjoernfan At least it's more pretty than a system().
14:45 batman hehe
14:48 kongelaks joined #mojo
15:08 suy joined #mojo
15:12 dod1 joined #mojo
15:13 asarch joined #mojo
15:15 Britzel joined #mojo
15:28 ladnaV joined #mojo
15:31 labrown joined #mojo
15:49 jhthorsen_ joined #mojo
15:49 wircus joined #mojo
15:50 batman joined #mojo
15:52 sri \o\
15:52 sri /o/
15:53 dod joined #mojo
15:55 jnbek joined #mojo
16:12 rwstauner sri is doing the wave /o/ /o/ /o/  \o\ \o\ \o\
16:12 Vandal joined #mojo
16:31 dabudabu joined #mojo
16:46 jpn joined #mojo
16:57 yakudza joined #mojo
16:57 bc547 joined #mojo
17:08 xaka joined #mojo
17:39 drisics joined #mojo
17:49 sh4 joined #mojo
17:57 dpetrov_ joined #mojo
18:06 GabrielVieira joined #mojo
18:15 marcus o/
18:17 DaTa joined #mojo
18:22 dod joined #mojo
18:23 egopro joined #mojo
18:24 marcus_ joined #mojo
18:25 DaTa joined #mojo
18:38 drisics joined #mojo
18:42 drisics joined #mojo
18:45 drisics left #mojo
18:46 blue_sky joined #mojo
18:51 drisics joined #mojo
19:16 anaio joined #mojo
19:23 egopro joined #mojo
19:28 sinkovsky joined #mojo
19:28 sergeysinkovsky joined #mojo
19:32 sinkovsky joined #mojo
19:54 sri html5.1 is in development now :o
20:00 sinkovsky joined #mojo
20:14 sinkovsky joined #mojo
20:16 anaio sri, simple-logger should number requests
20:17 anaio ... or make the message formatting editable
20:17 anaio (i think dancer does both)
20:20 anaio i think it makes sense in-general, but also, I have a mojo app that makes subsequent requests to itself and in the logs its hard to distinguish one request from the other
20:24 egopro joined #mojo
20:32 wircus joined #mojo
20:32 batman joined #mojo
20:32 wircus_ joined #mojo
20:32 batman_ joined #mojo
20:33 wircus joined #mojo
20:34 lukep joined #mojo
20:39 mattastrophe joined #mojo
20:41 b2b joined #mojo
20:55 mire joined #mojo
21:07 xaka joined #mojo
21:07 batman_ joined #mojo
21:07 wircus_ joined #mojo
21:09 perlite joined #mojo
21:10 wircus joined #mojo
21:24 egopro joined #mojo
21:38 sinkovsky joined #mojo
22:04 chansen marcus: Issues with Unicode::UTF8 or encoding issues in general?
22:04 marcus chansen: encoding issues in general, no issues with your module.
22:04 marcus chansen: but mostly it seems to work just great, it's just some edge cases I need to figure out.
22:05 chansen ok
22:18 marcus for one, I need to figure out how to get emoji to work :)
22:19 marcus guess I could use http://code.kwint.in/emoji/?size=24 but it doesn't feel right somehow
22:20 wt joined #mojo
22:25 egopro joined #mojo
22:32 alexeiras joined #mojo
22:35 chansen I would just fallback to clients support for font/unicode
22:36 chansen How many people in this channel will see "🐫" as a BACTRIAN CAMEL?
22:37 * marty sees it
22:37 chansen marty: OS X?
22:37 * marty nods
22:40 chansen marcus: FYI: irccloud relies on clients support
22:42 chansen marcus: irccloud lacks badly on history/scrollback and provides no facility to search the history
22:42 warcus chansen: good :)
22:43 mattastrophe joined #mojo
22:53 * sri wonders if you could aggregate channel histories from all your users into a shared channel log, which can then stay searchable forever
22:54 sri basically combine channel log and irc client
22:55 marcus sri: technically you could, I think the challenge is mostly not pissing off your users.
22:56 * marcus is implementing html5 notifications atm.
22:59 chansen it's tricky, a user who left the channel shouldn't be able to read the history/log IMO
22:59 sri yea, only allow history search if the user is still in the channel
23:00 chansen and only the history when he was a member of the channel
23:00 batman_ joined #mojo
23:00 wircus joined #mojo
23:02 buu chansen: How exactly is that any better than just logging what you see?
23:04 wircus joined #mojo
23:04 chansen buu: because a user should be able to read history when not connected to the clients aslong as he is a member of the channel?
23:05 mattastrophe joined #mojo
23:07 buu chansen: How do you define member if he isn't connected?
23:09 chansen buu: marcus is implementing a web based IRC service similar to irccloud.com but better (I hope ;), a user is a member of a channel until he leaves it
23:10 chansen or there is a implied/limited connection time
23:16 chansen tokuhirom: please turn of you nick changes
23:25 egopro joined #mojo
23:26 mattastrophe joined #mojo
23:29 jzawodn joined #mojo
23:43 Averna joined #mojo
23:46 ObseLeTe joined #mojo
23:53 ObseLeTe joined #mojo

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