Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Strange issue with Mojolicious

by Anonymous Monk
on May 01, 2013 at 11:34 UTC ( #1031549=note: print w/ replies, xml ) Need Help??


in reply to Strange issue with Mojolicious

When you go to http://mojocasts.com/e3 turn on javascript so you can see the comments

solution is add return

post '/momcorp' => sub { my $self = shift; return $self->render(text => 'denied') if !$self->auth; return $self->render(text => 'Welcome to Momcorp!'); };

Think of it like this, its like having a $person object, and you do  $person->name('bender') if ! $self->auth; $person->name('rodriguez');

Doesn't matter if the conditional is true, name is always changed afterwards :)


Comment on Re: Strange issue with Mojolicious
Select or Download Code
Re^2: Strange issue with Mojolicious
by walkingthecow (Friar) on May 01, 2013 at 11:39 UTC
    For some reason in ArchLinux with FireFox 20.0.1 and Shockwave Flash 11.2 r202, I am unable to actually play the video in the browser, or view the comments, even with JavaScript enabled. I've just been downloading the OGV files. Actually, I don't even see a comment section ;) I appreciate the help. That actually fixed the code. I wish I had seen the comments so I didn't look like a dork posting here.

      For some reason in ArchLinux with FireFox 20.0.1 and Shockwave Flash 11.2 r202, I am unable to actually play the video in the browser,

      Me neither, I watch the video on vimeo

      or view the comments, even with JavaScript enabled.

      Well, its disqus, so you have to enable javascript for disqus too -- firefox -safe-mode does a good job of enabling all javascripts and showing the comments :)

      That actually fixed the code. I wish I had seen the comments so I didn't look like a dork posting here.

      I don't think you did :) I think you looked like me :) I had to go out of my way to discover the comments section ; videos are great for showing whats possible, but they're practically never corrected for typos.

        I can watch them on vimeo as well, and I can now see the comments. Thanks again! :)
      Don't feel bad, i was bitten by the same issue. I often wondered if the cast was release before some changes in the under laying code.
      -Pizentios

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1031549]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (14)
As of 2014-07-10 13:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (211 votes), past polls