[Mojolicious] Re: How do I enable multiple loggers?

2014-04-23 Thread Tekki
Why don't you use Mojo::Log? In startup: my $log1 = Mojo::Log-new(path = $path1); my $log2 = Mojo::Log-new(path = $path2); $self-helper(log1 = sub {return $log1}); $self-helper(log2 = sub {return $log2}); And in the controller: $self-log1-info('I am in log 1'); $self-log2-info('I

[Mojolicious] Re: How do I enable multiple loggers?

2014-04-23 Thread Tekki
Am Mittwoch, 23. April 2014 17:10:04 UTC+2 schrieb Richard Sugg: no - even if I do both loggers as helpers, they both log to the first log file, and the second log file isn't even created. That's correct. But this seems to be a Log4perl and not a Mojolicious question. Take a look at this:

Re: [Mojolicious] Re: How to ignore Content-Length: 0 in mojo:ua

2014-06-03 Thread Tekki
Have you tried this? http://mojolicio.us/perldoc/Mojo/Content#relaxed -- 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 mojolicious+unsubscr...@googlegroups.com. To

Re: [Mojolicious] Mojo::JSON and Math::Big...

2014-06-30 Thread Tekki
Am Montag, 30. Juni 2014 22:37:57 UTC+2 schrieb David Oswald: What kind of number would you return them as? Let's consider Math::BigInt: I realize that it is not as simple as I thought at the beginning. My problem was just that libraries like AngularJS aren't very happy when they have to

[Mojolicious] Re: How to run in production mode?

2014-07-05 Thread Tekki
Perl ... $ENV{MOJO_MODE} = 'production'; ... /Perl https://github.com/kraih/mojo/wiki/Apache-deployment#apachemod_perl-psgiplack Am Samstag, 5. Juli 2014 15:53:54 UTC+2 schrieb Renato Forti: Location /cloud SetHandler perl-script PerlHandler Plack::Handler::Apache2

[Mojolicious] Re: UserAgent; SSL connect attempt failed because of handshake problems; Inactivity timeout

2014-08-13 Thread Tekki
Don't know if this is related to your problem, but did you update IO::Socket::SSL too? Am Dienstag, 12. August 2014 18:15:25 UTC+2 schrieb Tim: I updated to the lastest version. The steal_handle error is gone. But ... -- You received this message because you are subscribed to the

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

2014-09-15 Thread Tekki
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, which is a minimalistic and possibly the fastest

[Mojolicious] Re: Mojo::JSON fails to decode strings with utf8-flag set

2014-09-15 Thread Tekki
Am Montag, 15. September 2014 11:50:02 UTC+2 schrieb Pelle: I'm reading records from PostgreSQL where one column contains a UTF-8 encoded JSON-string. decode_json expects bytes as input, not characters. Why don't you define this column as bytea (BLOB)? -- You received this message

[Mojolicious] Re: How should one iterate items in this tag?

2014-11-20 Thread Tekki
$dom-at('p')-contents-last; http://mojolicio.us/perldoc/Mojo/DOM#contents -- 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

[Mojolicious] Re: Why isn't my data been added to the stash in mojolicious?

2014-12-07 Thread Tekki
Do I need to actually modify the DOM for the stash to be populated? Basically I'm just trying to get data back from my request to fill the combobox options. The stash is not part of the DOM of the response, it is a data storage on the server side. You probably want to write

[Mojolicious] Re: Problem starting hypnotoad with systemd script

2015-04-13 Thread Tekki
Did you remember to set PERLBREW_ROOT and PERLBREW_HOME and call $PERLBREW_ROOT/perl5/perlbrew/etc/bashrc before you start the application? See here: http://perlbrew.pl/Perlbrew-In-Shell-Scripts.html Am Montag, 13. April 2015 13:38:59 UTC+2 schrieb Nacho B: THE RESULTS: - If I write an

[Mojolicious] hypnotoad -s has no effect

2015-12-18 Thread Tekki
Mojolicious 6.37 Perl 5.22.0 (Perlbrew) Debian 8.2 If I do the following mojo generate app Xy cd xy hypnotoad script/xy hypnotoad -s script/xy "Stopping Hypnotoad server ... gracefully." the server continues running, even if "hypnotoad -s..." is called serveral times. What could be the reason

Re: [Mojolicious] hypnotoad -s has no effect

2015-12-19 Thread Tekki
quot;..." or did you do that? > > Thanks for the answer. I did that, it wrote the process number. I see now that the cause must be an interference of another software, probably Eclipse. On a second installation the shutdown works as expected. Tekki -- You received this message because you a

[Mojolicious] Re: Encoding UTF-8 being interpreted as Windows-1252

2017-04-04 Thread Tekki
There should be no reason to encode a JSON string. -- 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 mojolicious+unsubscr...@googlegroups.com. To post to this

[Mojolicious] Re: Encoding UTF-8 being interpreted as Windows-1252

2017-04-05 Thread Tekki
This question on Stackoverflow is about PHP and a request with content-type application/x-www-form-urlencoded, not application/json. Maybe your problem is caused by the JavaScript library you use. I use Mojolicious together with Angular, run many of the UI tests with names that contain '&' and

[Mojolicious] Re: Can't get url placeholder in auth model

2017-08-06 Thread Tekki
You don't define the id parameter when you call $auth, so: my $auth = $r->under('/:id'... But now take care, the path available in $auth->get starts after the ID. -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this group

[Mojolicious] Re: Error installing Mojolicious-7.56

2017-11-18 Thread Tekki
> > Can you try changing all "@2x" in the distribution to "-2x" and see if > that installs fine? > If I rename the files and change the code it installs without error. Tekki -- You received this message because you are subscribed to the Google Groups "Mo

Re: [Mojolicious] UTF-8 in Mojo::File

2017-10-19 Thread Tekki
> > I've reverted the change, since it wasn't good enough. > Thanks a lot! -- 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

[Mojolicious] Re: "mojo get" fails on some HTTPS website

2018-08-07 Thread Tekki
de-CH 4. Content-Type: text/html;charset=ISO-8859-1 5. Date: Tue, 07 Aug 2018 06:40:22 GMT 6. Transfer-Encoding: chunked 7. Vary: Accept-Encoding 8. X-Powered-By: ASP.NET No idea if this is related to the problem. Tekki Am Montag, 6. August 2018 17:37:33 UTC

Re: [Mojolicious] "mojo get" fails on some HTTPS website

2018-08-07 Thread Tekki
Why a problem with the website? Try: curl -v 'https://www.google.com/' -H 'Accept-Encoding: gzip' curl -v 'https://www.justhappy.fr/' -H 'Accept-Encoding: gzip' | gunzip -c Am Dienstag, 7. August 2018 10:13:12 UTC+2 schrieb dim0xff: > > It is problem with website, but not with mojo. > > Try: >

[Mojolicious] Re: Nordic Perl Workshop and Mojoconf in Oslo

2018-09-11 Thread Tekki
Because the rest of us has been at the Swiss Perl Workshop. ;) Am Dienstag, 11. September 2018 10:49:11 UTC+2 schrieb sri: > > And if you've not been there (WHY NOT?!!!) > -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this

[Mojolicious] Re: invalid Google API redirect_uri

2018-01-20 Thread Tekki
Am Freitag, 19. Januar 2018 06:36:41 UTC+1 schrieb yanni1...@g.ucla.edu: > > I'm trying to add Google authentication to my app running on localhost. > Have you tried Mojolicious::Plugin::OAuth2 ? -- You received this message because you

[Mojolicious] Re: Can't locate object method "plugin" RenderFile via package ...

2018-03-13 Thread Tekki
Just take a look at the SYNOPSIS : # Mojolicious > $self->plugin('RenderFile'); > > ... > > # In controller > $self->render_file('filepath' => '/tmp/files/file.pdf'); # file name will be > "file.pdf" > > "# Mojolicious" =

Re: [Mojolicious] rendering images located outside of public directory

2018-04-06 Thread Tekki
is the browser URL, not the absolute path of the file on the server. So if you add '/data/common/mojo' to the static paths, the tag for '/data/common/mojo/2018-04-03-18-32-46_G/AH1vsAGE.png' is Am Donnerstag, 5. April 2018 22:25:37 UTC+2 schrieb Caveman Pl: > > > -- You received this

[Mojolicious] Re: Newbie question

2018-04-09 Thread Tekki
This $self->render you have edited is probably not the place where you actually render the template. Regards Tekki Am Sonntag, 8. April 2018 17:54:18 UTC+2 schrieb Jan Eskilsson: > > In my controller i do > $self->render(mytest => 'my test'); > > -- You received

Re: [Mojolicious] Re: Newbie question

2018-04-09 Thread Tekki
As long as you get an error message, nothing is broken. ;) Mojolicious tries to render the correct template, so the error must be somewhere on the way to it. Am Montag, 9. April 2018 12:40:13 UTC+2 schrieb Jan Eskilsson: > > I start to believe that my installation is somehow broken, I also have

Re: [Mojolicious] Re: Looking for volunteers

2018-04-18 Thread Tekki
Just to mention, since ES2017 you can write: String(d.getHours()).padStart(2, '0') It's supported by all browsers excluding IE. More infos on developer.mozilla.org <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/padStart> . Tekki Am Dienst

[Mojolicious] Re: Mojolicious::Lite how to refresh table only

2018-03-26 Thread Tekki
@Luc: I see your example in the e-mail from Saturday. As Dan said, you shouldn't use jQuery, but a framework like vue.js that refreshes the UI automatically when the underlying data changes. Then don't send HTML code as response to the search query, but JSON data and let the

[Mojolicious] Re: Mojolicious::Lite how to refresh table only

2018-03-26 Thread Tekki
Here you see an example: https://gist.github.com/Tekki/2785aadba9cf9e7f2c01e279f750fd41 Am Montag, 26. März 2018 08:18:31 UTC+2 schrieb Tekki: > > As Dan said, you shouldn't use jQuery, but a framework like vue.js > <https://vuejs.org> ... > -- You received this m

[Mojolicious] Re: Javascript in template vs static file thoughts?

2018-10-03 Thread Tekki
If a JS file is tightly related to the application (for example a Vuejs/Angular module), I use $c->render_to_string to create it at the first call and then store it as a static file. -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To

[Mojolicious] Re: Mojo::Server::Morbo

2019-08-15 Thread Tekki
Morbo should listen to http://*:8080, not 127.0.0.1:8080. 127.0.0.1 is localhost inside the container. Am Mittwoch, 14. August 2019 13:10:38 UTC+2 schrieb verenceLola: > > ENV MOJO_LISTEN=http://127.0.0.1:8080 > > -- You received this message because you are subscribed to the Google Groups