GithubHelp home page GithubHelp logo

songyuqing-cloud / app-p Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ironcamel/app-p

0.0 0.0 0.0 26 KB

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

Perl 100.00%

app-p's Introduction

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::Slurper::read_text()
    w   to File::Slurper::write_text()
    S   to say()
    p   to print()
    dd  to Data::Dump::dd()
    jd  to JSON::encode (utf8/pretty)
    jl  to JSON::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()
    xj  to convert an xml file to json
    jx  to convert a json file to xml
    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!

app-p's People

Contributors

creaktive avatar ironcamel avatar kyzn avatar manwar avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.