[Mojolicious] Re: Rotating secrets (heads up)

2013-12-20 Thread Viktor Nacht
That's a simple but awesome change. - V -- 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 group, send emai

[Mojolicious] Perlbew Compilation Flags to Pass to Perl for Mojolicious

2014-06-13 Thread Viktor Nacht
I'm spooling up a CentOS 6 box exclusively to run Mojolicious apps under a perlbrew environment. Although I've used perl a long time, I've never compiled my own. It appears the vendor perl just turns on every flag and option their is, but my instinct is to only turn on what I need. For the sake

[Mojolicious] Please Critique my Mojolicious::Command::morbo Command

2014-08-06 Thread Viktor Nacht
Good news, everyone! After 20 years of living in the pre-Perl 5.10 cold of the CGI.pm universe, I've spent only a few months basking in the glory of modern perl and Mojolicious. Meaning the code that follows may be terrible, so please be nice. :) I initial wrote this to make it easier to switch

[Mojolicious] Re: Please Critique my Mojolicious::Command::morbo Command

2014-08-07 Thread Viktor Nacht
On Thursday, August 7, 2014 11:24:17 AM UTC-7, sri wrote: > > I'm afraid it is very unlikely that such a command could actually work, > it's against the nature of the Morbo design. If it did in fact work, i > believe we would want it in core. > > When you say it wouldn't work, do you mean conce

[Mojolicious] Escaping in Nested Tag Helpers

2014-08-21 Thread Viktor Nacht
Is there way to do prevent the escaping being done here? Inside a template: %= t div => input_tag 'email' Output: I tried putting b() around the input_tag and it didn't help. I realize I can just use actual div tags or a begin/end block, I was just curious if there was

[Mojolicious] Re: Escaping in Nested Tag Helpers

2014-08-21 Thread Viktor Nacht
Second code block should read: Got my tests mixed up. -- 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...@googlegroup

[Mojolicious] Re: Wishlist thread (second edition)

2014-08-25 Thread Viktor Nacht
Making 'field-with-error' something you can set, e.g. app->validator->error_class('has-error') Use case is easier integration with Bootstrap (and similar), dealing with legacy code, and UI/Backend teams that don't communicate well. :) I love the elegance of the validation feature, but locking i

[Mojolicious] Under under Mojolicious::Lite

2014-09-22 Thread Viktor Nacht
I discovered the following when refactoring my routes to use under: get '/foo/bar'; # Renders foobar.html.ep under '/foo'; get '/bar'; # Renders bar.html.ep Is this intentional/expected? Obviously this can solved by explicitly naming the route, but I think it undermines Mojolicious' intrinsi

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

2014-10-15 Thread Viktor Nacht
mySQL, DBI and DBIx::Class. Nothing too exciting. :) -- 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 gro

[Mojolicious] Re: Swag!

2014-11-10 Thread Viktor Nacht
These are awesome! I'm interested in the LE shirt but I really don't like the gold. It is possible or a big hassle to include a LE shirt with different color glitter, like silver? Or specifically silver? :) V -- You received this message because you are subscribed to the Google Groups "Mojoli

[Mojolicious] Re: Swag!

2014-11-10 Thread Viktor Nacht
Wow, thank you. Looks like you already changed it, so it's safe to order? On Monday, November 10, 2014 10:10:10 AM UTC-8, sri wrote: > > It is possible or a big hassle to include a LE shirt with different color >> glitter, like silver? Or specifically silver? :) >> > > Haha, totally possible. :)

[Mojolicious] Re: Swag!

2014-11-10 Thread Viktor Nacht
Order placed. I shall wear it proudly. - V On Monday, November 10, 2014 11:02:28 AM UTC-8, sri wrote: > > Looks like you already changed it, so it's safe to order? >> > > Yes. If anyone here wants anything else, like flip flops, umbrellas, santa > hats, scarfs... just let me know. ;) > > -- > seb

[Mojolicious] Re: Wishlist thread (third edition)

2015-06-17 Thread Viktor Nacht
Rerequest for a way to set a custom error class name to override field-with-error in TagHelpers. I believe this has been rejected before. :) - V -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this group and stop receiving e

[Mojolicious] Highlight Current Page in Navigation

2018-03-13 Thread Viktor Nacht
I'm sure this is common issue that can be solved in many ways, I just wanted to make sure I wasn't totally missing the Mojo way to do it. :) I have a navigation area, say pages A, B, C. When on page B, I want to add a CSS class to the a tag to highlight the current page. The 2 ways that spring

[Mojolicious] List of All Optional Modules?

2018-09-08 Thread Viktor Nacht
Is there a singular list of all of the optional/suggested/recommended modules for Mojolicious? I know they're listed in docs, but they (seem) to be split between the relevant guide/command/module. I'd like to include all of them as a kind of "complete" Mojolicious install. I searched the Mojo

[Mojolicious] Re: List of All Optional Modules?

2018-09-09 Thread Viktor Nacht
Thank you very much for the reply and the link. I did already see that, but to a native English speaker, "such as" sounds like a sample list, not a complete list. If it is complete, that's awesome. I agree with you about the cpanfile in the sense that it would be nice pass an env var or an arg

[Mojolicious] Re: List of All Optional Modules?

2018-09-09 Thread Viktor Nacht
That's the money. That's perfect. Thank you! On Saturday, September 8, 2018 at 5:00:23 PM UTC-7, Viktor Nacht wrote: > > Is there a singular list of all of the optional/suggested/recommended > modules for Mojolicious? I know they're listed in docs, but they (seem) to

[Mojolicious] Pedantic Syntax Question

2018-09-24 Thread Viktor Nacht
Is it possible to make (the idea of this) work as one liner? % content_for 'header' => javascript 'app.js' Of course I know the options to do this as a block or just not use the tag helper, I was just curious. I like the elegance. V -- You received this message because you are subscribed to t

[Mojolicious] Elegantly copy items of a hash returned from DBI to $c->param

2018-09-29 Thread Viktor Nacht
So I have a simple hash: { a => 'b', b => 'c' } That I would like to turn into params per the Mojolicious::Plugin::TagHelpers docs: You can also use "param" in Mojolicious::Plugin::DefaultHelpers to set them > manually and let necessary attributes always be generated automatically. It appear

Re: [Mojolicious] Elegantly copy items of a hash returned from DBI to $c->param

2018-10-02 Thread Viktor Nacht
This was the ticket, I ended up using append. Thank you for the pointer, it really helped. -- 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..

[Mojolicious] Javascript in template vs static file thoughts?

2018-10-02 Thread Viktor Nacht
For Mojolicious, are there any best practices or compelling arguments for putting scripts in templates vs static files in the public directory? I do plan on eventually using AssetPack to serve them combined and minified. Just curious what most other people do. V -- You received this message

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

2018-10-03 Thread Viktor Nacht
Thank you for the input, it helps. I'm basically in the middle. Right now I keep a js file under the public dir in a lightweight module format, but I add a script tag at the end of the relevant template with variables holding url_for values for AJAX calls, Javascript arrays for select values,

[Mojolicious] Getting File Extension of Mojo::Upload Object

2018-10-12 Thread Viktor Nacht
Just wondering if I'm missing anything for getting the file extension of an uploaded file before it's been moved or slurped. Right now my approach is to create Mojo::File object about the filename from Mojo::Upload and extract it from there. Is there a more direct method I'm unaware of? Thanks

[Mojolicious] Mojolicious::Plugin::JSUrlFor

2018-11-01 Thread Viktor Nacht
Has anyone used this project in a larger project? It fits my philosophy perfectly, but I'm concerned it hasn't been updated recently. It definitely fills a niche for maximum freedom of route management. - V -- You received this message because you are subscribed to the Google Groups "Mojolicio

Re: [Mojolicious] Mojolicious::Plugin::JSUrlFor

2018-11-07 Thread Viktor Nacht
ould fork it. > > On Thu, Nov 1, 2018, 5:33 PM Viktor Nacht <mailto:viktor.na...@gmail.com> wrote: > Has anyone used this project in a larger project? It fits my philosophy > perfectly, but I'm concerned it hasn't been updated recently. It definitely > fill

[Mojolicious] $c->req->env Empty

2018-11-09 Thread Viktor Nacht
In my Mojolicious::Lite app $c->req->env is completely empty under Morbo and under Hypnotoad behind an Apache reverse proxy. Is this normal or am I totally missing something? V -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe fr

Re: [Mojolicious] $c->req->env Empty

2018-11-09 Thread Viktor Nacht
Wow, I really feel stupid.. Thank you for having the patience to reply. I've been using CGI.pm for around 22 years and Mojolicious for 2 years. Old habits die hard, lol. -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this

[Mojolicious] Using 'state' in a helper

2018-11-19 Thread Viktor Nacht
Does using state inside a helper last for the duration of the connection, or something longer lasting like a process, worker, etc? I want to create (and return) a current DateTime object and make it accessible to multiple helpers and templates during a connection. I saw this Gist, but I'm not s

Re: [Mojolicious] Using 'state' in a helper

2018-11-20 Thread Viktor Nacht
*facepalm* The stash, of course. Thank you. :) On Monday, November 19, 2018 at 6:01:26 PM UTC-8, Dan Book wrote: > > A 'state' variable lasts for the rest of that process, but is only > available to the scope it's declared in. If you want per-connection (or > more precisely per request), I reco

[Mojolicious] Test Existence of Key in Session Hash Without Creating Element

2019-01-10 Thread Viktor Nacht
So if you do something like: if ($c->session->{order}) { # process order } The session cookie looks something like this: {"expires":1547178562,"cart":{}} Is there a way to test for the existing of keys in the session has that won't cause it to string into existence? Using 'exists' or 'defined

[Mojolicious] Re: Test Existence of Key in Session Hash Without Creating Element

2019-01-10 Thread Viktor Nacht
*sigh* I meant: {"expires":1547178562,"order":{}} -- 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 group

Re: [Mojolicious] Re: Test Existence of Key in Session Hash Without Creating Element

2019-01-10 Thread Viktor Nacht
Ugh, you nailed it. I found a spot in my code that suffered from autovivification. Thank you. -- 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+unsubs

[Mojolicious] Alternative layout Directories

2019-01-24 Thread Viktor Nacht
Is it possible to specify alternative layout directories? Rather than put all my layouts in a single directory, I wanted to do something more like this: templates ├── desktop │ └── layouts └── mobile └── layouts This is just a very simplified example, not my literal application. V --

Re: [Mojolicious] Alternative layout Directories

2019-01-25 Thread Viktor Nacht
For sure, that’s what I’ll go with for now. Thank you for taking the time to create this reply and suggestion. IMO, this seems a little bit rigid for Mojo. I thought about something like this (it's a bad idea, just sharing): push @{app->layout->paths}, qw(mobile desktop); But trying to specif

Re: [Mojolicious] Alternative layout Directories

2019-01-25 Thread Viktor Nacht
Thank for the reply and suggestion. That will be my goto for now. - mt -- 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. T

[Mojolicious] Using Mojolicious::Sessions for Non-Session Cookies

2019-02-01 Thread Viktor Nacht
I really love the "it just works" interface of Mojo's session cookie, and I was disappointed that I can't use that same kind of approach to other cookies. I wrote a helper to de/serialize my non-session cookies automatically, but that's still a step away from the amazing awesomeness of sessions

Re: [Mojolicious] Using Mojolicious::Sessions for Non-Session Cookies

2019-02-06 Thread Viktor Nacht
hub.com/s1037989/84a365f4afb6ebd987557802a5482a57> at it. I > think it should be crafted as a plugin and of course you'll want to modify > the logic so that it behaves as you intend. But the prototype, at least, > demonstrates how it could be done completely independently fr

[Mojolicious] Using Mojolicious::Lite Syntax in Modules to Add Routes

2019-04-29 Thread Viktor Nacht
I have a fairly simple Mojo app where I just want to spin off the admin routes into a module but still use the Mojolicious::Lite syntax. I understand I could "grow" the app, but that would add a lot of extra files where I really just need to add one file. Is something like this possible? I tri

Re: [Mojolicious] Using Mojolicious::Lite Syntax in Modules to Add Routes

2019-04-29 Thread Viktor Nacht
can only be imported into one "app" script for the "app". > However, you could call a function and pass it `app` or `app->routes` to > add routes to like a full app would. > > -Dan > > On Mon, Apr 29, 2019 at 2:15 PM Viktor Nacht > wrote: > >&g

[Mojolicious] Subroutine main::app redefined

2019-05-08 Thread Viktor Nacht
I received the following error using eval to run a helper: # ./puravida.pl eval 'say app->hashid(1014)' Subroutine main::app redefined at (eval 601) line 1. The only change I'm aware of is I updated Mojolicious, but I would assume that's the issue, lol. Does this sound like an issue in my code,