{"id":1021,"date":"2016-12-25T10:39:11","date_gmt":"2016-12-25T10:39:11","guid":{"rendered":"http:\/\/blog.briang.org\/?p=1021"},"modified":"2016-12-25T10:39:11","modified_gmt":"2016-12-25T10:39:11","slug":"rfc-new-pm-a-perl-e-usenew-shortener","status":"publish","type":"post","link":"https:\/\/blog.briang.org\/?p=1021","title":{"rendered":"RFC: new.pm &#8211; a perl -e use\/new shortener"},"content":{"rendered":"<p><a href=\"http:\/\/perlmonks.org\/?node_id=1178455\"><strong>RFC: new.pm &#8211; a perl -e use\/new shortener<\/strong><\/a><\/p>\n<blockquote><p>I tend to use perl one-liners extensively, mostly for testing purposes. In particular, I often load a module with a loooooooooong name only to instantiate it once. And it&#8217;s boooooooring to type the whole name twice.<\/p>\n<p>So I came up with an idea of a one-liner shortener along the lines of:<\/p>\n<p><code>perl -we 'use new qw(My::Very::Long::Module x foo 42); print $x->get_foo;'<\/code><\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>RFC: new.pm &#8211; a perl -e use\/new shortener I tend to use perl one-liners extensively, mostly for testing purposes. In particular, I often load a module with a loooooooooong name only to instantiate it once. And it&#8217;s boooooooring to type the whole name twice. So I came up with an idea of a one-liner shortener [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[5,4],"class_list":["post-1021","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-perl","tag-perlmonks"],"_links":{"self":[{"href":"https:\/\/blog.briang.org\/index.php?rest_route=\/wp\/v2\/posts\/1021","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.briang.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.briang.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.briang.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.briang.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1021"}],"version-history":[{"count":1,"href":"https:\/\/blog.briang.org\/index.php?rest_route=\/wp\/v2\/posts\/1021\/revisions"}],"predecessor-version":[{"id":1022,"href":"https:\/\/blog.briang.org\/index.php?rest_route=\/wp\/v2\/posts\/1021\/revisions\/1022"}],"wp:attachment":[{"href":"https:\/\/blog.briang.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1021"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.briang.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1021"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.briang.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1021"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}