There are many such global commands released to CPAN for example: https://metacpan.org/search?q=Mojolicious%3A%3ACommand%3A%3A
-Dan On Wed, Oct 23, 2019 at 6:25 PM Dan Book <gri...@gmail.com> wrote: > You would install it under Mojolicious::Command::generate, as described at > https://metacpan.org/pod/Mojolicious::Guides::Cookbook#Adding-commands-to-Mojolicious. > Easiest if you have a local::lib and simply put it under > ~/perl5/lib/perl5/Mojolicious/Command/... > > -Dan > > On Wed, Oct 23, 2019 at 6:16 PM Roger Crew <c...@cs.stanford.edu> wrote: > >> what's the right way to get something like this >> (i.e., new mojo generate commands, or variations/additional-options on >> existing ones) >> added to my 'mojo' command search space. >> >> I can't do it as a plugin, since plugin stuff doesn't becomes available >> until you actually *add* the plugin to the application you're currently >> working on (assuming it even *is *an application that you're working on, >> as opposed to a plugin, or a role, or something else), and the mojo >> generate commands are all for *creating* source-trees from scratch. >> >> About the only thing I can come up with is playing games with @INC in >> order to swap in my own version of Mojo::HelloWorld to add stuff to its >> ->commands, >> >> ... which all looks to be at least medium evil. >> >> but I also hate to ask for Yet Another Environment Variable (but maybe >> that's the RIght Thing here?) >> >> >> On Tuesday, October 1, 2019 at 6:23:53 AM UTC-7, Roger Crew wrote: >>> >>> so, on the theory that if I'm doing something at least twice there >>> should be a script for it, >>> I wrote a "mojo generate role", role.pm, >>> >>> that is mostly a ripoff of "mojo generate plugin" but with some better >>> defaults >>> i.e., >>> >>> mojo generate role BaseClass RoleName >>> >>> creates a rudimentary development directory for the >>> BaseClass::Role::RoleName role >>> with a single testcase template (...that will actually work straight out >>> of the box if you chose >>> a baseclass that doesn't require arguments to build...). >>> >>> I can do a pull request if there's interest in this and you want actual >>> code to look at. >>> >> -- >> 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 view this discussion on the web visit >> https://groups.google.com/d/msgid/mojolicious/e3795845-2934-4dce-b95f-a1d76fc9d6f4%40googlegroups.com >> <https://groups.google.com/d/msgid/mojolicious/e3795845-2934-4dce-b95f-a1d76fc9d6f4%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/mojolicious/CABMkAVUix3H%2BSs9s7UaQsSo7kSKwHS%2BonEphPhJmpjfPLsq6GQ%40mail.gmail.com.