Re: [Mojolicious] Re: CouchDB Plugin

2013-12-17 Thread Stefan Adams
On Tue, Dec 17, 2013 at 9:52 AM, Adam McLean wrote: > So in my opinion encapsulating the flexibility the built-in UA provides > would be a real challenge Thanks for your response! Does this mean that you would not recommend a CouchDB plugin as no good API could be developed? What if the API w

Re: [Mojolicious] Re: CouchDB Plugin

2013-12-17 Thread Stefan Adams
On Dec 17, 2013 10:29 AM, "Adam McLean" wrote: > > Although maybe contributing to the Mojolicious core would be a better use of time! Ha! With the reputation I've likely built up for myself on this list I doubt that will ever happen. :D But I would like to. Just need to better understand the fra

Re: [Mojolicious] Re: CouchDB Plugin

2013-12-17 Thread Stefan Adams
cause what's the difference at that point?? So, the solution is not to write a plugin but instead an app module for doing the more specific operations that I need the app to do. For couchdb, there is nothing that I or anyone else can do for the Mojo community. Correct? On Dec 17, 2013 10:55 AM, &qu

Re: [Mojolicious] Listening with IPV6

2013-12-20 Thread Stefan Adams
On Fri, Jul 26, 2013 at 4:17 AM, Dirk Koopman wrote: > So any suggestions as to why I can't listen on an ipv6 addess? > Confirmation that it works. $ /sbin/ifconfig eth0 | grep inet6.*Scope:Global inet6 addr: *2001:470:1f11:d34::4/64* Scope:Global $ mojo version CORE Perl(v

[Mojolicious] Relative URL as the first argument to M::UA::get

2013-12-28 Thread Stefan Adams
In this dumb snippet, what abs URL would M::UA::get fetch? get '/test' => sub { shift->ua->get("/") } In the docs, I only see abs URLs passed to get. What if a rel URL were passed to get? What would 'get' do? -- You received this message because you are subscribed to the Google Groups "Mojol

Re: [Mojolicious] Question about performance

2013-12-29 Thread Stefan Adams
On Mon, Apr 1, 2013 at 6:09 PM, Sebastian Riedel wrote: > To scale with blocking backend APIs you have to increase the number of > worker processes and reduce the number of concurrent connections each > worker is allowed to handle. Mojo::Server::Prefork::workers() states "Number of worker proces

Re: [Mojolicious] Wishlist thread

2014-01-02 Thread Stefan Adams
On Thu, Jan 2, 2014 at 11:49 AM, Joe Landman wrote: > There's Mojolicious::Plugin::Authentication as well :) >> > > Thats part of it ... I mean more of a plugin where you hand it a set of > pages for login, request an account, failed, etc... . > > Basically I am looking for something that would u

Re: [Mojolicious] Wishlist thread

2014-01-02 Thread Stefan Adams
On Thu, Jan 2, 2014 at 9:47 PM, sri wrote: > My thought, similar to Joe, I think, is that the Mojo built-in Login would >> be a best practices method (like with CSRF and Validation) that grants >> security, at least from a prototyping perspective. >> > > I doubt there would be consensus on how ex

Re: [Mojolicious] SSL read error?

2014-01-04 Thread Stefan Adams
https://localhost:4022 hi$ curl -k https://localhost:4022 hi$ curl -k https://localhost:4022 hi$ curl -k https://localhost:4022 On Sun, Sep 1, 2013 at 9:15 PM, Charlie Brady < charlieb-m...@budge.apana.org.au> wrote: > > > On Fri, 30 Aug 2013, Stefan Adams wrote: > > > I&#x

[Mojolicious] Mojo::IOLoop->recurring

2014-01-05 Thread Stefan Adams
my $id = Mojo::IOLoop->recurring($interval => sub { ... }); Within the sub, is it possible to adjust the $interval of the event loop for that sub? Does that make sense? I have an action within a recurring sub and if the action fails I'd like to extend the amount of time until it gets tried again

Re: [Mojolicious] Wishlist thread

2014-01-05 Thread Stefan Adams
Is there a way for Mojo::IOLoop->recurring($interval => sub { ... }); to run NOW as well as every $interval seconds? If not, does it make sense to build in an option that would allow it to work like that? What's the way that people are doing that now? my $sub = sub { ... }; Mojo::IOLoop->timer(0

[Mojolicious] Kick off Mojo::IOLoop->recurring NOW

2014-01-05 Thread Stefan Adams
I thought this might have been a wishlist item, but I might have thought wrong. Creating a new thread for the purpose of this message. Sorry for the double-post. :( Is there a way for Mojo::IOLoop->recurring($interval => sub { ... }); to run NOW as well as every $interval seconds? If not, does

[Mojolicious] reuse option

2014-01-09 Thread Stefan Adams
$ env MOJO_LISTEN=http://*:8080?reuse=1 mojo daemon Your vendor has not defined Socket macro SO_REUSEPORT, used at /home/s/perl5/perlbrew/perls/perl-5.18.1/lib/site_perl/5.18.1/IO/Socket/IP.pm line 472 What is the purpose of reuse=1 and how are you supposed to use it? I've read that it will "Allo

Re: [Mojolicious] Listening with IPV6

2014-01-14 Thread Stefan Adams
On Fri, Dec 20, 2013 at 5:53 PM, Stefan Adams wrote: > Is it possible to listen on the same port number on both the IPv4 address > and the IPv6 address? > # env MOJO_LOG_LEVEL=debug MOJO_LISTEN=http://[2001:1890:1221:800::61]*:80*, http://12.110.226.61*:80* perl -Mojo -E 'a("/

Re: [Mojolicious] Listening with IPV6

2014-01-14 Thread Stefan Adams
On Tue, Jan 14, 2014 at 9:02 PM, sri wrote: > Is it possible for one Mojolicious process to listen on port 80 for both >> the IPv6 address as well as the IPv4 address? >> > > Should we have IPv6 experts on this list, this might be worth > investigating (and possibly patch), but i suppose portabil

Re: [Mojolicious] Listening with IPV6

2014-01-14 Thread Stefan Adams
On Tue, Jan 14, 2014 at 9:37 PM, Stefan Adams wrote: > > > > On Tue, Jan 14, 2014 at 9:02 PM, sri wrote: > >> Is it possible for one Mojolicious process to listen on port 80 for both >>> the IPv6 address as well as the IPv4 address? >>> >> >> S

Re: [Mojolicious] Listening with IPV6

2014-01-14 Thread Stefan Adams
On Tue, Jan 14, 2014 at 10:56 PM, sri wrote: > I don't know what this means, but between lines 63 and 64 of >> Mojo::IOLoop::Server, I did `undef $fd;'... >> > > Ah! That makes perfect sense and is easy to improve. :) > > > https://github.com/kraih/mojo/commit/1c14ddae57c1ce9220227c7b966e8551c71e

Re: [Mojolicious] Listening with IPV6

2014-01-15 Thread Stefan Adams
On Wed, Jan 15, 2014 at 7:30 AM, Dirk Koopman wrote: > Am I missing something here? Unless you are perming these two addresses > out of several more, what's wrong with: MOJO_LISTEN=http://[::]:80 ? This > will happily answer on both IPV4 as well IPV6 (on a linux box at least). Thanks, Dirk! I

Re: [Mojolicious] Re: Blocked in my first non-blocking test

2014-01-15 Thread Stefan Adams
As probably the biggest culprit of people who cause bugging on this topic, I would just like to add in that it bugs me from the other side that I have been so slow to "get" it. I'm learning much more about blocking and how it's non magical and have come a long way since starting the conversation o

Re: [Mojolicious] Re: Blocked in my first non-blocking test

2014-01-16 Thread Stefan Adams
On Wed, Jan 15, 2014 at 4:48 PM, Ben van Staveren wrote: > Okay, so... blocking/non-blocking 101 (sortakinda): > Thanks so much, Ben, for this 101 primer! It has really helped a lot! Seems to me it would be worth while to take as is and put on Mojo's wiki. At least there'd be a start to some n

Re: [Mojolicious] Re: Blocked in my first non-blocking test

2014-01-16 Thread Stefan Adams
On Thu, Jan 16, 2014 at 9:29 AM, Ben van Staveren wrote: > Are there any tools to help pinpoint where blocking is occurring? For >> example, when I wrote my first app connecting to a database, I had no >> reason to suspect that the connection to the database is what was causing >> the event loop

Re: [Mojolicious] Re: Blocked in my first non-blocking test

2014-01-16 Thread Stefan Adams
On Wed, Jan 15, 2014 at 4:48 PM, sri wrote: > i got my non-blocking mojo (haha!) from actually implementing event > loops... and it took me quite a while of looking like a fool to really grok > it. :D Wow! I'm personally glad to hear you say this. Cuz I've been looking like a fool on this li

Re: [Mojolicious] Blocked in my first non-blocking test

2014-01-16 Thread Stefan Adams
On Wed, Jan 15, 2014 at 12:18 PM, Nacho B wrote: > Hi, I am very, very interested in the non-blocking features of Mojolicious > and its server, but I am blocked in my first try. > > This is a simple remote port test: > > use Socket; > > my ($ip, $protocol, $port, $myhouse, $yourhouse, $log); > >

Re: [Mojolicious] Re: Blocked in my first non-blocking test

2014-01-16 Thread Stefan Adams
On Thu, Jan 16, 2014 at 1:59 PM, sri wrote: > Here's my first attempt at explainaing the difference between blocking and > non-blocking operations in the Mojolicious documentation. > > > https://github.com/kraih/mojo/commit/2772cba060999a25d621c4c8caaff4db54d2cc07 > At the end of that, while per

Re: [Mojolicious] Re: Blocked in my first non-blocking test

2014-01-17 Thread Stefan Adams
On Thu, Jan 16, 2014 at 1:19 PM, sri wrote: > Like with Ben's write up, I'd recommend posting it on a Non-blocking >> section of the Wiki. >> > > It's a wiki, everybody can edit it and add new pages. ;) > I'll take that as an invitation to go ahead. :) https://github.com/kraih/mojo/wiki#perfor

Re: [Mojolicious] Re: Blocked in my first non-blocking test

2014-01-17 Thread Stefan Adams
On Fri, Jan 17, 2014 at 10:17 PM, sri wrote: > Here's another great blog post on the topic Glen just published. > > http://tempi.re/a-mojolicious-non-blocking-web-service-why- > What a phenomenal story! I'll add this into the wiki section on the topic. -- *

Re: [Mojolicious] Re: Blocked in my first non-blocking test

2014-01-18 Thread Stefan Adams
On Jan 18, 2014 12:00 AM, "sri" wrote: >> >> What a phenomenal story! I'll add this into the wiki section on the topic. > > > Btw. I've intentionally avoided the word "performance", because non-blocking I/O is about "scalability". Those terms are often used interchangeably, but they shouldn't. T

Re: [Mojolicious] Re: Blocked in my first non-blocking test

2014-01-18 Thread Stefan Adams
On Sat, Jan 18, 2014 at 4:37 AM, Stefan Adams wrote: > You even gave me the straight up answer (use -w large -c 1) but I didn't > understand it and I read that message about 100 times. I remember now one reason this was so difficult for me to grasp. "Number of worker processe

Re: [Mojolicious] Listening with IPV6

2014-01-18 Thread Stefan Adams
On Tue, Jan 14, 2014 at 10:56 PM, sri wrote: > I don't know what this means, but between lines 63 and 64 of >> Mojo::IOLoop::Server, I did `undef $fd;'... >> > > Ah! That makes perfect sense and is easy to improve. :) > > > https://github.com/kraih/mojo/commit/1c14ddae57c1ce9220227c7b966e8551c71e

Re: [Mojolicious] Mojo::UserAgent and Mojo:IOLoop question

2014-02-04 Thread Stefan Adams
On Tue, Feb 4, 2014 at 1:48 AM, Vincent HETRU wrote: > Ok my mistake was to declare $ua and $delay inside the recurring callback > instead of the startup sub. Also, you dropped the blocking 'sleep(10)'. :) I don't think $delay needs to be declared outside; and for $ua, you might be able to use

Re: [Mojolicious] Re: Why the Content-Type for *.jpg and *.JPG is different?

2014-02-08 Thread Stefan Adams
On Sat, Feb 8, 2014 at 3:25 PM, sri wrote: > Btw. It would be nice if someone turned MIME::Types into a Mojolicious > plugin that registers all types in existence with app->types. ;) Has anyone started this yet? I've been looking for something to contribute. Seems like something I could manag

[Mojolicious] DATA Templates

2014-02-11 Thread Stefan Adams
Can I have DATA templates in a Mojolicious full app and can I have multiple DATA templates in multiple modules where the modules inherit the rendering method from a base class? At line 58 of Mojolicious::Renderer I've put in say Data::Dumper::Dumper($self->{index}); On the first call to a page af

Re: [Mojolicious] DATA Templates

2014-02-11 Thread Stefan Adams
# Find template my $template = $self->template_name($options); return $loader->data($self->{index}{$template}, $template); } On Tue, Feb 11, 2014 at 4:27 PM, Stefan Adams wrote: > Can I have DATA templates in a Mojolicious full app and can I have > multiple DATA templates

Re: [Mojolicious] DATA Templates

2014-02-11 Thread Stefan Adams
On Tue, Feb 11, 2014 at 7:00 PM, Ben van Staveren wrote: > Good that your issue got resolved, but... you'll hate me for this, but why > use DATA templates? If you've got a full app you might as well go the full > monty and store your templates separately. If you're building things up so > they can

[Mojolicious] Mojolicious for the Internet of Things

2014-02-28 Thread Stefan Adams
Is it possible for Mojolicious to be the core component in an Internet of Things solution? I want to build a device that is behind a firewall and I want a user who is also behind a firewall to connect to that device. I assume that a cloud "gateway" would need to be leveraged. The user would conn

Re: [Mojolicious] Mojolicious for the Internet of Things

2014-03-01 Thread Stefan Adams
On Sat, Mar 1, 2014 at 10:32 AM, John Dunlap wrote: > The one ring is a myth. What does that mean? -- *Keystone IT NOTICE:* This e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and is

Re: [Mojolicious] Re: Why the Content-Type for *.jpg and *.JPG is different?

2014-03-03 Thread Stefan Adams
On Sat, Feb 8, 2014 at 3:25 PM, sri wrote: > Btw. It would be nice if someone turned MIME::Types into a Mojolicious > plugin that registers all types in existence with app->types. ;) I think this is done. Much more simple than I expected, assuming I understood the request properly. https://gi

Re: [Mojolicious] Re: Why the Content-Type for *.jpg and *.JPG is different?

2014-03-06 Thread Stefan Adams
On Thu, Mar 6, 2014 at 1:24 AM, sri wrote: > What should be done about conflicting types? e.g. dwg is >> application/x-acad, image/x-dwg, and image/vnd.dwg >> > > Just like "xml". > > https://github.com/kraih/mojo/blob/master/lib/Mojolicious/Types.pm#L30 > Thanks, sri! I'll do that! Becaus

Re: [Mojolicious] High CPU consumption on Linux Mint 16 and raspian with hypnotoad

2014-03-07 Thread Stefan Adams
Looks like a really nice app! FWIW, hypnotoad is also consuming 100% CPU for me on Ubuntu 13.10. I followed the instructions exactly and modified only the contact configuration line as that was a requirement to start the server. On Thu, Mar 6, 2014 at 10:03 AM, Luc Didry wrote: > Hello, > > I

Re: [Mojolicious] High CPU consumption on Linux Mint 16 and raspian with hypnotoad

2014-03-07 Thread Stefan Adams
WNOHANG, NULL) = 0 rt_sigprocmask(SIG_UNBLOCK, [CHLD], NULL, 8) = 0 clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f0c1c870a10) = 23058 clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f0c1c870a10) = 23059 O

Re: [Mojolicious] High CPU consumption on Linux Mint 16 and raspian with hypnotoad

2014-03-07 Thread Stefan Adams
iencing as well. They also are (rightly so) not running your app as root and the instructions do no state anything in regards to modifying your default configuration of setting user and group for cases when you execute your app as an unprivileged user. On Fri, Mar 7, 2014 at 6:38 AM, Stefan Ad

[Mojolicious] move_to or spurt

2014-04-30 Thread Stefan Adams
What do people think about move_to() creating the directory to the file that it will spurt rather than generating an error? sub move_to { my ($self, $to) = @_; make_path dirname($to); # Something like this? spurt $self->{content}, $to; return $self; } Or what about doing it in spurt()

Re: [Mojolicious] large file uploads part by part?

2014-05-08 Thread Stefan Adams
You asked for any input... Are you running Mojo behind a proxy like nginx as is so common? You'll want to ensure that the proxy's file upload limit matches what you intend for Mojo. On May 8, 2014 4:24 PM, "M. Aaron Bossert" wrote: > > Really weird. I see the file uploading in the /tmp directory

Re: [Mojolicious] using stash with mojo::command

2014-05-21 Thread Stefan Adams
What about $self->app->stash() ? On May 21, 2014 10:44 AM, "Neil Watson" wrote: > I'm trying to stash some data to render to a text template, but I get > the error: > Can't locate object method "stash" via package "DeltaR::Command::query" > > What have I done wrong? > > package DeltaR::Command::q

Re: [Mojolicious] using stash with mojo::command

2014-05-22 Thread Stefan Adams
On Wed, May 21, 2014 at 1:03 PM, Neil Watson wrote: > On Wed, May 21, 2014 at 10:48:10AM -0500, Stefan Adams wrote: > >> What about $self->app->stash() ? >> > > Moving on from this I get to the renderer. I'd tried a few combinations, > but resulted in erro

Re: [Mojolicious] Re: Uploads and 413 errors

2014-05-27 Thread Stefan Adams
On Tue, May 27, 2014 at 11:13 PM, Richard Eitz wrote: > I'm having the same issue, did you solved it? > Are you using nginx? Set client_max_body_size. http://www.cyberciti.biz/faq/linux-unix-bsd-nginx-413-request-entity-too-large/ -- You received this message because you are subscribed to the

Re: [Mojolicious] Re: Mojolicious 5.0 released

2014-05-31 Thread Stefan Adams
On Sat, May 31, 2014 at 7:17 AM, sri wrote: > Just for the curious, what was tge reason for the wantarray cleanup (sorry >> if thats a little OT)? >> > > Methods that work differently in list context than in scalar context are > at best a source for bugs, and, at worst an attack vector. So we wou

Re: [Mojolicious] Re: Mojolicious 5.0 released

2014-05-31 Thread Stefan Adams
On Sat, May 31, 2014 at 7:03 PM, sri wrote: > And what would that error class be? Mojo::Error? How would it relate to > Mojo::Exception? How do you raise those errors? If you want my opinion you > at least have to give me the full picture. I don't know the answer to any of those questions and I

Re: [Mojolicious] Re: Routing issue.

2014-06-05 Thread Stefan Adams
On Thu, Jun 5, 2014 at 3:37 PM, sri wrote: > I think it might actually be worth considering the removal of > Mojo::Server::CGI from core. It has always been discouraged as a deployment > option and is really a nightmare to support, nobody knows how to configure > their Apache properly. And we alr

Re: [Mojolicious] Re: Routing issue.

2014-06-05 Thread Stefan Adams
On Thu, Jun 5, 2014 at 5:13 PM, sri wrote: > For now i've added a note to the cookbook recipe. > > > https://github.com/kraih/mojo/commit/e6eca12e85fc92f78e5dc232fd7d55722d202383 > Very helpful addition to the docs. -- You received this message because you are subscribed to the Google Groups

Re: [Mojolicious] Re: Request URI not being parsed correctly in CGI mode

2014-06-06 Thread Stefan Adams
On Jun 6, 2014 4:59 PM, "sri" wrote: > > time to push forward. Is it possible that someone (Charlie? :) could maintain Mojo:: Server:: CGI independently of core? -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this group and

Re: [Mojolicious] Re: Request URI not being parsed correctly in CGI mode

2014-06-06 Thread Stefan Adams
On Jun 6, 2014 5:31 PM, "sri" wrote: >> >> Is it possible that someone (Charlie? :) could maintain Mojo:: Server:: CGI independently of core? > > > Absolutely, but i think there are some misconceptions flying around here. CGI would still be supported through Mojo::Server::PSGI, you just have to in

Re: [Mojolicious] Re: Request URI not being parsed correctly in CGI mode

2014-06-06 Thread Stefan Adams
On Jun 6, 2014 5:54 PM, "sri" wrote: > > There's an app for that. Wow! Thanks! Cookbook, FAQ, or Wiki that? -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this group and stop receiving emails from it, send an email to mojo

Re: [Mojolicious] start recurring timer once with multiple workers

2014-07-03 Thread Stefan Adams
On Thu, Jul 3, 2014 at 4:46 AM, Tim wrote: > is it possible to start a recurring timer only once when I have multiple > workers? I think I've seen a similar discussion in this forum before, but I can't find it. IIRC, the final consensus was that for the requested behavior, the developer should

Re: [Mojolicious] Re: Wishlist thread (second edition)

2014-07-08 Thread Stefan Adams
On Tue, Jul 8, 2014 at 12:56 PM, sri wrote: > I guess Mojolicious is done. :) It's funny you say this (albeit in jest), because I've thought to myself many times: "I wonder if Mojolicious will ever be considered 'done'? Not counting the new HTTP/2.0 and other RFC pending changes..." I always

Re: [Mojolicious] Route not found problem ("None of these routes could generate a response...")

2014-07-11 Thread Stefan Adams
I get that a lot too. Could it be that the redirect_activate method couldn't be reached? On Jul 11, 2014 4:42 PM, "Charlie Brady" wrote: > > I hesitate to ask this, since I'm using apache/CGI, but I'm stumped, so > need some help. > > I'm getting a 404 page on form submission. But the route I'm u

Re: [Mojolicious] Re: command in app directory

2014-07-14 Thread Stefan Adams
On Mon, Jul 14, 2014 at 5:04 AM, Jan Henning Thorsen wrote: > like "MyApp::Command::whatever". Also, modules that are lowercase is > supposed to be used as pragmas: http://perldoc.perl.org/perlpragma.html > So wouldn't MyApp::Command::whatever be in violation of that convention? Or is that a pr

Re: [Mojolicious] Link header

2014-08-02 Thread Stefan Adams
On Aug 2, 2014 1:34 PM, "sri" wrote: > > Personally i'm only aware of two projects actually using them, which would be the GitHub API and Riak. Seems valuable to me. Perhaps more people would use them if given motivation through the existence of this convenience function? -- You received this m

Re: [Mojolicious] Re: How to set header in Mojo::Test

2014-08-07 Thread Stefan Adams
On Thu, Aug 7, 2014 at 4:22 PM, sri wrote: > $tx->req->headers->referrer('http://127.0.0.1:'. >>> $ua->server->{nb_port}.'/page/user') >>> >> > I originally missed this, but this is wrong in more ways than one, do not > ever poke into objects like this! That data is private. > Just to be cle

Re: [Mojolicious] Re: How to set header in Mojo::Test

2014-08-07 Thread Stefan Adams
On Thu, Aug 7, 2014 at 4:33 PM, Александр Грошев < aleksander.grosc...@gmail.com> wrote: > Yes, you are right. But I tried this way, it can't access to app correctly > without > specifying port. It's 8080 when run under hypnotoad and 3000 otherwise by default. If you set the port differently f

Re: [Mojolicious] Nested helpers

2014-08-08 Thread Stefan Adams
On Fri, Aug 8, 2014 at 2:51 PM, sri wrote: > What do you think? I am in favor but cannot articulate why. :( I like the idea of organization. I also like features and flexibility. Can you share some of what the division among the core devs is? -- You received this message because you are s

Re: [Mojolicious] Nested helpers

2014-08-15 Thread Stefan Adams
On Aug 15, 2014 1:34 AM, "sri" wrote: > > https://gist.github.com/anonymous/cbe8fa3dabf6497ec7b9 Wow! That's enormous! What a slight change in the application code for developers to make and what an enormous payback!! I'm really looking forward to implementing this in my projects! Thanks fo

[Mojolicious] Randomness in a template

2014-08-20 Thread Stefan Adams
I have a template: % use List::Util 'shuffle'; % my @roster = shuffle @$roster; And when using hypnotoad I don't get a new randomized roster list on every page refresh. It seems that I have about 4 possible randomized lists that my browser may display, presumale because I have 4 hypnotoad proces

Re: [Mojolicious] Re: multiple authentication methods?

2014-08-21 Thread Stefan Adams
On Aug 21, 2014 7:15 AM, "Jan Henning Thorsen" wrote: > > I think it's a very bad idea to only allow one login from one browser. What about a situation of a paid service and the license only grants the user the ability to login from one machine, often the case because the service provider doesn't

Re: [Mojolicious] Re: Randomness in a template

2014-08-21 Thread Stefan Adams
On Thu, Aug 21, 2014 at 7:11 AM, Jan Henning Thorsen wrote: > sub startup { > my $app = shift; > # this code is run in parent process > > # this next_tick() code is run once in each forked child > Mojo::IOLoop->next_tick(sub { srand }); > Thanks, Jan! This exactly solved it for

Re: [Mojolicious] Re: multiple authentication methods?

2014-08-21 Thread Stefan Adams
On Thu, Aug 21, 2014 at 7:57 AM, Jan Henning Thorsen wrote: > You could still restrict access to given resources Touche! Excellent point! I retract my comment. :) -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this gro

Re: [Mojolicious] Perl 5.12

2014-08-23 Thread Stefan Adams
On Sat, Aug 23, 2014 at 2:49 PM, sri wrote: > So from now on Mojolicious can only be installed without additional > dependencies on Perl 5.14 and newer. Does the FAQ need to be updated? *In addition we will also keep the distribution installable up to a certain legacy version that we deem wort

Re: [Mojolicious] Sustainable crowdfunding

2014-08-26 Thread Stefan Adams
On Tue, Aug 26, 2014 at 8:55 AM, sri wrote: > For a long time there has been a PayPal button on the frontpage, but there > were almost no donations, so i don't believe this works. What i find > fascinating about Gittip is the sustainability aspect, you give less, but > regularly. You just need a

Re: [Mojolicious] Sustainable crowdfunding

2014-08-26 Thread Stefan Adams
On Tue, Aug 26, 2014 at 11:59 AM, sri wrote: > Any examples for how to make it look nice? This was the first one that I ever came across: Notice the Flattr button in the upper right. Flattr is interesting, it seems to be a bigger projec

Re: [Mojolicious] Sustainable crowdfunding

2014-08-26 Thread Stefan Adams
On Tue, Aug 26, 2014 at 11:59 AM, sri wrote: > My MetaCPAN profile has links to all the different ways to donate, but > those buttons don't look that great. Sorry, I should have looked at this first before sending my message. You already made an icon out of the gittip heart. Great! I think t

Re: [Mojolicious] Cutesy dates (going full stack or not)

2014-08-27 Thread Stefan Adams
I like it. But I'm curious what the motivation is to bring it into core? I think we could all think of 1,000 things that our apps do and, starting from scratch, it would be convenient for these things to be built into core. I would like to see more things that can help me out as a developer to ma

Re: [Mojolicious] Cutesy dates (going full stack or not)

2014-08-28 Thread Stefan Adams
On Thu, Aug 28, 2014 at 7:32 AM, Jan Henning Thorsen wrote: > Something like this: > > http://groups.google.com/group/mojolicious. For more options, visit https://groups.google.com/d/optout.

Re: [Mojolicious] Cutesy dates (going full stack or not)

2014-08-28 Thread Stefan Adams
On Thu, Aug 28, 2014 at 7:58 AM, Jan Henning Thorsen wrote: > Stefan: That is indeed a Mojolicious template. What I meant is that I want > to provide a pretty absolute time (not like the ironman webpage) and then I > replace that on the client side with whatever "data-timestamp" holds. > time() =

Re: [Mojolicious] Cutesy dates (going full stack or not)

2014-08-28 Thread Stefan Adams
that something happened 5 minutes ago or such. Anyway... Sorry to beat a dead horse. Just curious. > On Thursday, August 28, 2014 4:46:03 PM UTC+2, Stefan Adams wrote: >> >> >> On Thu, Aug 28, 2014 at 7:58 AM, Jan Henning Thorsen < jan.henn...@thorsen.pm> wrote: >>>

[Mojolicious] Mojo::DOM and JSON

2014-09-14 Thread Stefan Adams
>From the docs I see you can do this: $ mojo get https://api.metacpan.org/v0/author/SRI /name Sebastian Riedel So therefore I thought it reasonable to do this: $ mojo get ' http://localhost:5984/rtc/_design/lookup/_view/beacon?key=[30024,36068]' /rows/0/value/parent But I get no response. Th

Re: [Mojolicious] Re: Mojo::DOM and JSON

2014-09-15 Thread Stefan Adams
On Mon, Sep 15, 2014 at 3:40 AM, Tekki wrote: > How do you define "formatted well"? Oddly enough, just line breaks and indents. That is, while this fails to give me 'mojo get' parsing: {"total_rows":1,"offset":0,"rows":[ {"id":"ab7093f9bbc349a12c52b449c0002b10","key":[30024,36068],"value":{"_

Re: [Mojolicious] Re: Mojo::DOM and JSON

2014-09-15 Thread Stefan Adams
On Mon, Sep 15, 2014 at 9:26 AM, Tekki wrote: > According to ECMA-404 ( > http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf), > line breaks are "insignificant whitespaces" that are allowed, but optional > (page 8 of the PDF). Pretty printing isn't a feature of Mojo::JSON,

Re: [Mojolicious] Re: Mojo::DOM and JSON

2014-09-15 Thread Stefan Adams
On Mon, Sep 15, 2014 at 10:07 AM, sri wrote: > So why wouldn't Mojo::JSON be able to parse the non-pretty printed JSON >> that is the response of CouchDB? >> > > Maybe try parsing it with Mojo::JSON and check the error message? > Great idea! My apologies if this should have been gist'd... It's

Re: [Mojolicious] Re: Mojo::DOM and JSON

2014-09-16 Thread Stefan Adams
On Tue, Sep 16, 2014 at 1:08 AM, Abhijit Menon-Sen wrote: > What content-type are you seeing with the response? Terrific question! Thank you! *Content-Type: text/plain; charset=utf-8* How silly that CouchDB would respond with JSON of content type text/plain! -- You received this message b

Re: [Mojolicious] Re: Mojo::DOM and JSON

2014-09-16 Thread Stefan Adams
On Tue, Sep 16, 2014 at 8:07 AM, Stefan Adams wrote: > > *Content-Type: text/plain; charset=utf-8* > > How silly that CouchDB would respond with JSON of content type text/plain! > Thanks for the hints everyone! *If you send Accept: application/json in your request, CouchDB kno

Re: [Mojolicious] Re: Example app for the frontpage

2014-09-18 Thread Stefan Adams
On Sep 18, 2014 12:19 PM, "Scott Wiersdorf" wrote: > > The new app induces wonder, and someone familiar with the project will see that it highlights mojo's power. However, if I were new to Mojolicious, or unfamiliar with modern web frameworks generally, this would be unintelligible without a littl

Re: [Mojolicious] Re: Example app for the frontpage

2014-09-18 Thread Stefan Adams
On Thu, Sep 18, 2014 at 12:53 PM, sri wrote: > get '/' => {template => 'index'}; While I appreciate the clarity, one of the things that I loved to see as a newbie (and still 2 years later as a newbie) is get '/' => 'index'. "Man that's easy!" If more clarity is desired, I'd prefer to see them

Re: [Mojolicious] Re: Example app for the frontpage

2014-09-18 Thread Stefan Adams
On Thu, Sep 18, 2014 at 3:03 PM, Scott Wiersdorf wrote: > That seems fine to me. I usually err on the verbose side and it takes me a > few tries to get it small enough :) > > I still think there's room, perhaps in a separate paragraph or section, > for a little additional marketing for people who

Re: [Mojolicious] Re: Example app for the frontpage

2014-09-18 Thread Stefan Adams
On Thu, Sep 18, 2014 at 4:14 PM, sri wrote: > get '/' => 'index'; # Index is the name of the route and a route's default >> action is a template if one exists by the name. >> >> > That's way out of scope for a frontpage example though, its only job is to > give you a vague idea of what Mojoliciou

Re: [Mojolicious] Re: Signatures

2014-09-20 Thread Stefan Adams
On Sep 20, 2014 9:20 PM, "sri" wrote: > > Wonder if a little boilerplate would be acceptable for the frontpage example. > > use 5.20.0; > use experimental 'signatures'; > use Mojolicious::Lite; How about something like: use Mojolicious::Signatures; use Mojolicious::Lite; Or use Moj

Re: [Mojolicious] Re: Signatures

2014-09-20 Thread Stefan Adams
On Sep 20, 2014 10:08 PM, "sri" wrote: >> >> How about something like: >> >> use Mojolicious::Signatures; >> use Mojolicious::Lite; > > > The big question is why? Well, i don't know any better... :) To me it looks more planned and intentional as a significant feature for Mojolicious to provide /

Re: [Mojolicious] Marketing poll

2014-09-21 Thread Stefan Adams
On Sun, Sep 21, 2014 at 4:52 PM, sri wrote: > Everyone can participate here. Imagine you just heard about Mojolicious > for the very first time and visited our frontpage (http://mojolicio.us), > which one of these two examples would you find more inspiring? > > a) https://gist.github.com/anon

Re: [Mojolicious] I've got a problem with rewriting and url_for('/')

2014-09-22 Thread Stefan Adams
I feel like the core Plugin Mount would best address your objectives. I've built a router app based entirely on Mount that simply makes other apps available within their respective url name spaces. Hopefully that's what you're looking for! On Sep 22, 2014 10:34 PM, "Luc Didry" wrote: > Hello, >

Re: [Mojolicious] We need your quotes!

2014-09-22 Thread Stefan Adams
On Mon, Sep 22, 2014 at 3:28 PM, sri wrote: > So if you can share some details, please add a quote to this table. I added three for three separate entities that I represent. I'm not a great wordsmith for crafting quotes of impact, but hopefully they will suffice in sharing my stories and are n

Re: [Mojolicious] Re: Marketing poll

2014-09-23 Thread Stefan Adams
On Tue, Sep 23, 2014 at 9:57 AM, sri wrote: > beginners probably don't have perl 5.20 installed, so they won't be able >> to cut 'n paste the new example either >> > > I was going to post a snippy response...but...well...shit... > http://cpanmetadb.plackperl.org/versions/ > I think what you're s

Re: [Mojolicious] Re: Marketing poll

2014-09-23 Thread Stefan Adams
On Sep 23, 2014 3:17 PM, "sri" wrote: >> >> Thus I would estimate now + 1 year for an interim solution, if you want to minimize the sum of whining by admins, app-developers and core-developers. > > > I really hope i never gave anyone the impression that one of my goals would be to minimize whining

Re: [Mojolicious] Mango is now deprecated

2014-09-25 Thread Stefan Adams
On Thu, Sep 25, 2014 at 12:01 PM, Ben van Staveren wrote: > and go see what else is on offer on the NoSQL front Report back, please. I've been very happy with Non-Blocking Mojo::UserAgent and CouchDB to this point. I'll admit, I've hardly leveraged CouchDB yet. Still trying to learn it. --

Re: [Mojolicious] What databases are you using with Mojolicious? (Poll)

2014-09-25 Thread Stefan Adams
On Thu, Sep 25, 2014 at 2:07 PM, sri wrote: > Lets have a little poll, what databases are you using with Mojolicious? > And which modules are you currently using to access them? I originally was using DBIx::Class with MySQL but got bit hard by the blocking. I didn't know what to do about it.

[Mojolicious] M::P::PODBook

2014-09-26 Thread Stefan Adams
This is *really* sloppy, but I wanted to see if it was an OK idea. I want to be able to take the Mojolicious documentation on the go, on my Kindle, as a single page Book. I tried Perlybook, but the Docs were out of order. So I forked M::P::PODRenderer to M::P::PODBook

Re: [Mojolicious] Re: What databases are you using with Mojolicious? (Poll)

2014-09-26 Thread Stefan Adams
On Fri, Sep 26, 2014 at 11:55 AM, sri wrote: > how do you manage schema upgrades? I have only used DBIx::Class::Schema::Loader, more specifically dbicdump. I've tied that into a Mojolicious::Command such that I could upgrade fairly easily using my Mojo app commands as the basis for all things m

Re: [Mojolicious] [Security] Breaking changes in Mojolicious 5.48

2014-10-08 Thread Stefan Adams
On Tue, Oct 7, 2014 at 6:52 PM, sri wrote: > I've also modified our deprecation policy to make it easier for us to > react to these kinds of emergencies. If you feel this is wrong, you're > welcome to start a discussion. I figured such a policy in regards to security issues goes without saying.

[Mojolicious] Server-side storage out of the box (Wishlist)

2014-10-13 Thread Stefan Adams
I've often thought how wonderful it would be for Mojo to have a built-in simple server-side storage capability. It does cookies, sessions, flash, etc, all out of the box. Why not a simple Server Storage (like HTML5 offers Local Storage)? Of course, that's what databases are for. But sometimes t

Re: [Mojolicious] Re: Server-side storage out of the box (Wishlist)

2014-10-13 Thread Stefan Adams
On Oct 13, 2014 1:11 PM, "Roland Lammel" wrote: > > By the way you always have files as basic storage available, with utility methods from Mojo::Util (slurp and spurt) and Mojo::Json (j) you have the toolbox at your hand. Yes, but then for each project you have to roll your own. This is really wh

Re: [Mojolicious] TagHelpers - check_box

2014-10-20 Thread Stefan Adams
On Oct 20, 2014 1:39 PM, "Marlik" wrote: > > Hello, how do I implement a checkbox? > > % = check_box article => <% = $ item -> {link}%> How about: %= check_box article <%= $item->{link} %> ? > page shows the %> > > Thank you. > > -- > You received this message because you are subscribed to

Re: [Mojolicious] Non-blocking resolver (looking for ideas)

2014-11-03 Thread Stefan Adams
On Sun, Nov 2, 2014 at 11:28 PM, sri wrote: > I know it's a long shot, but maybe someone here has an idea for how we > could get Mojolicious to not block on name resolution. I'm not suggesting that this is a new or novel approach that no one has thought of, but, theoretically, you could build y

  1   2   3   4   >