Skip to content

kyzn/App-p

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code
This branch is 5 commits behind ironcamel:master.

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
bin
 
 
 
 
 
 
 
 
 
 

About

Steroids for your perl one-liners. Is that even possible?

Installation

sudo cpan App::p

Documentation

See App::p

Usage

Usage: p [-lneE etc] 'code'
    The code can make use of:
    r   to File::Slurp::read_file
    w   to File::Slurp::write_file
    S   to say()
    p   to print()
    dd  to Data::Dump::dd()
    jd  to JSON::XS::encode (utf8/pretty)
    jl  to JSON::XS::decode (utf8/allow nonref) a thing
    xd  to XML::Hash::LX::hash2xml()
    xl  to XML::Hash::LX::xml2hash()
    yd  to YAML::Dump()
    yl  to YAML::Load()
    get,head,getprint,getstore,mirror from LWP::Simple
    sum,first,min,max,zip,uniq,any,all,none ... all of List::AllUtils

Examples

p 'dd [File::Spec->path]'   # dynamically load arbitrary modules
p -pe 's/foo/bar/' foo.txt  # use your favorite options like -lane
p 'say "hello world!"'      # -E is assumed if no options are provided
p 'dd yl r "config.yml"'    # chain commands
p 'S sum 1,2,3,4'           # all of List::AllUtils is at your fingertips
p 'dd ExtUtils::Installed->new->modules' # list all installed modules
p '  dd xl r "/etc/xml/xml-core.xml"'    # print dump of hash converted xml
p 'p xd xl r "/etc/xml/xml-core.xml"'    # print xml converted from hash
p 'p get "http://icanhazip.com"'         # print contents of url
p 'dd uniq map $_->{ostext}, @{ jl get "http://www.cpantesters.org/distro/A/App-p.json" }' # have fun!

About

Steroids for your perl one-liners. Does that mean steroids for your steroids? Is that even possible?

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Perl 100.0%