Closed dex4er closed 3 years ago
I love perl -Mojo and it is awesome for simple oneliners. Would be possible to add Mojo::URL->new() to ojo module? Ie. as l function maybe.
perl -Mojo
Mojo::URL->new()
ojo
l
Sometimes I would like to parse URL addresses and then I would find perl -Mojo extremely helpful:
ie.
perl -Mojo -E 'say l("index.html")->to_abs(l("http://example.com"))
rather than
perl -Mojo -E 'say Mojo::URL->new("index.html")->to_abs(Mojo::URL->new("https://example.com"))'
Would this make it?
@kiwiroy looks great!
@kiwiroy could you ping your PR? I provided maybe a little better example of usage. Maybe it will be accepted by Kraith
I love
perl -Mojo
and it is awesome for simple oneliners. Would be possible to addMojo::URL->new()
toojo
module? Ie. asl
function maybe.Sometimes I would like to parse URL addresses and then I would find
perl -Mojo
extremely helpful:ie.
perl -Mojo -E 'say l("index.html")->to_abs(l("http://example.com"))
rather than
perl -Mojo -E 'say Mojo::URL->new("index.html")->to_abs(Mojo::URL->new("https://example.com"))'