{"id":14128483,"url":"https://github.com/mklement0/perli","last_synced_at":"2025-04-10T02:23:02.326Z","repository":{"id":52144351,"uuid":"42524451","full_name":"mklement0/perli","owner":"mklement0","description":"Multi-platform Perl REPL","archived":false,"fork":false,"pushed_at":"2025-03-10T23:18:46.000Z","size":2407,"stargazers_count":40,"open_issues_count":3,"forks_count":6,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-03T01:09:46.208Z","etag":null,"topics":["interactive","learning-by-doing","perl5","repl","shell","unix","windows"],"latest_commit_sha":null,"homepage":"","language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mklement0.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-09-15T14:26:17.000Z","updated_at":"2025-03-10T23:18:43.000Z","dependencies_parsed_at":"2024-05-02T03:08:30.054Z","dependency_job_id":"c886a3ab-5720-4033-b12a-796b5e21d3d8","html_url":"https://github.com/mklement0/perli","commit_stats":{"total_commits":22,"total_committers":3,"mean_commits":7.333333333333333,"dds":"0.40909090909090906","last_synced_commit":"8712199451b44c4cd0e8464dff59b9c37e74e2b1"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mklement0%2Fperli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mklement0%2Fperli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mklement0%2Fperli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mklement0%2Fperli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mklement0","download_url":"https://codeload.github.com/mklement0/perli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248143284,"owners_count":21054748,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["interactive","learning-by-doing","perl5","repl","shell","unix","windows"],"created_at":"2024-08-15T16:01:45.691Z","updated_at":"2025-04-10T02:23:02.304Z","avatar_url":"https://github.com/mklement0.png","language":"Perl","funding_links":[],"categories":["Perl"],"sub_categories":[],"readme":"[![npm version](https://img.shields.io/npm/v/perli.svg)](https://npmjs.com/package/perli) [![license](https://img.shields.io/npm/l/perli.svg)](https://github.com/mklement0/perli/blob/master/LICENSE.md)\n\n\u003c!-- START doctoc generated TOC please keep comment here to allow auto update --\u003e\n\u003c!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --\u003e\n\n**Contents**\n\n- [perli \u0026mdash; introduction](#perli-mdash-introduction)\n- [Examples](#examples)\n  - [Startup and help](#startup-and-help)\n  - [Automatic printing of results, use as a calculator](#automatic-printing-of-results-use-as-a-calculator)\n  - [Inspecting a variable](#inspecting-a-variable)\n  - [Inspecting regular-expression matches](#inspecting-regular-expression-matches)\n  - [Looking up Perl documentation](#looking-up-perl-documentation)\n- [Installation](#installation)\n  - [Supported platforms and prerequisites](#supported-platforms-and-prerequisites)\n  - [Installation from the npm registry](#installation-from-the-npm-registry)\n  - [Manual installation](#manual-installation)\n    - [Unix-like platforms](#unix-like-platforms)\n    - [Windows](#windows)\n- [Usage](#usage)\n- [License](#license)\n  - [Acknowledgements](#acknowledgements)\n  - [npm dependencies](#npm-dependencies)\n- [Changelog](#changelog)\n\n\u003c!-- END doctoc generated TOC please keep comment here to allow auto update --\u003e\n\n# perli \u0026mdash; introduction\n\n`perli` is a **multi-platform [Perl](https://www.perl.org/) [REPL (read-eval-print-loop)](http://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print%20loop)**\nfor interactive experimentation with Perl code, convenient documentation lookups, and quick computations.\n\nOn Unix-like platforms, `perli` makes use of the [`rlwrap` utility](https://github.com/hanslub42/rlwrap) to provide\ncommand-line editing support, persistent command history, and tab-completion;\nsee the [Installation](#installation) chapter below.\n\nSee the examples below, concise [usage information](#usage) further below,\nor read the [manual](doc/perli.md).\n\n# Examples\n\n## Startup and help\n\nOnce you enter `perli`, use `?` for help.\n\n![startup and help example](doc/images/example-startup-and-help.png)\n\n## Automatic printing of results, use as a calculator\n\nResults of expressions are automatically printed, which makes `perli` handy\nas an interactive calculator:\n\n![startup and help example](doc/images/example-calculator.png)\n\nResults are printed with the `Data::Dumper` core Perl module, which means\nthat they are reusable as input.\n\n## Inspecting a variable\n\nThe following example inspects the special `%INC` variable, which contains the\nlist of loaded modules. Note the first entry, which is `perli`'s own (optional)\ninitialization file.\n\nThe `\\` prefix here is not strictly necessary, but ensures that the hashtable is\nprinted in prettier form.\n\n![variable-inspection example](doc/images/example-inspect-variable.png)\n\n## Inspecting regular-expression matches\n\n`perli` provides the `.remi` (for *r*egular-*e*xpression *m*atch *i*nfo)\ncommand, which, in addition to an expression's own result, prints the values\nof the special variables that Perl maintains about the most recent successful\nregex match:\n\n![regex-matching example](doc/images/example-regex-matching.png)\n\n## Looking up Perl documentation\n\nInvoking documentation overlays the REPL temporarily, as a `man` page would\n(not shown here).\n\nBy default, `perli` tries to guess the _type_ of the element to look up, and\ninvokes `perldoc` behind the scenes accordingly.\n\n* Prefix form\n\nThe following is the equivalent of `perldoc perlrun`:\n\n![startup and help example](doc/images/example-doc-lookup-pre.png)\n\n* Postfix form\n\nThis form is handy for lookups while you're in the middle of typing an expression.\n\nThe following is the equivalen of `perldoc -f split`:\n\n![startup and help example](doc/images/example-doc-lookup-post.png)\n\n* Explicit-options form\n\nIf the \"fuzzy\" default lookup doesn't find anything, or shows the wrong page,\nyou can use the prefix form with explicit `perldoc` options.\n\nThe following example searches the FAQs (`-q`) for the term `while` (the default\nlookup would have looked for the _keyword_).\n\n![startup and help example](doc/images/example-doc-lookup-option.png)\n\n\n# Installation\n\n## Supported platforms and prerequisites\n\n`perli` runs on **Linux**, **macOS**, **Windows**, and - as @matheusfillipe assures me - on **Android**, with **Perl v5.6.2 or higher** installed.\n\nUsing the manual installation process detailed below, `perli` may work on other Unix-like platforms too.\n\nOn Unix-like platforms, `perli` makes use of the `rlwrap` utility, if present,  \nto provide command-line editing support, persistent command history,  \nand simple tab completion.\n\nOn Windows, `rlwrap` is not available, unfortunately, but you do get  \nin-session history and basic command-line editing out of the box (but no\ntab-completion).\n\nYou can install `rlwrap` as follows:\n\n* Debian-based Linux distros such as Ubuntu:\n\n        sudo apt-get install rlwrap\n\n* Fedora:\n\n        sudo yum install rlwrap\n\n* macOS, via [Homebrew](http://brew.sh):\n\n        brew install rlwrap\n\n* Unix-emulation environments for Windows:\n\n    * Cygwin (Windows):\n\n         Re-run Cygwin's `setup*.exe` and install\n         `Utils` \u003e `rlwrap and Base` \u003e `libreadline*`\n\n    * MSYS / MinGW / Git Bash (Windows):\n\n         Sadly, `rlwrap` is not offered. The next best thing is to use a\n         native Windows Perl version, with which you get at least basic command-line\n         editing and in-session history:\n         Deactivate the Unix Perl with `mv /bin/perl /bin/perl.inactive`\n         and install [Strawberry Perl](http://strawberryperl.com/)\n\n* All others: see [`rlwrap`'s homepage](https://github.com/hanslub42/rlwrap)\n\n\n## Installation from the npm registry\n\n\u003csup\u003eNote: Even if you don't use Node.js, its package manager, `npm`, works across platforms and is easy to install; try [`curl -L http://git.io/n-install | bash`](https://github.com/mklement0/n-install)\u003c/sup\u003e\n\nWith [Node.js](http://nodejs.org/) or [io.js](https://iojs.org/) installed, install [the package](https://www.npmjs.com/package/perli) as follows:\n\n    [sudo] npm install perli -g\n\n**Note**:\n\n* Whether you need `sudo` depends on how you installed Node.js / io.js and whether you've [changed permissions later](https://docs.npmjs.com/getting-started/fixing-npm-permissions); if you get an `EACCES` error, try again with `sudo`.\n* The `-g` ensures [_global_ installation](https://docs.npmjs.com/getting-started/installing-npm-packages-globally) and is needed to put `perli` in your system's `$PATH`.\n\n## Manual installation\n\n### Unix-like platforms\n\n* Download [the CLI](https://raw.githubusercontent.com/mklement0/perli/stable/bin/perli) as `perli`.\n* Make it executable with `chmod +x perli`.\n* Move it or symlink it to a folder in your `$PATH`, such as `/usr/local/bin` (macOS) or `/usr/bin` (Linux).\n\n### Windows\n\n* Download [the CLI](https://raw.githubusercontent.com/mklement0/perli/stable/bin/perli) as `perli.pl`.\n* Either move `perli.pl` itself into a folder in your `%PATH%`, or write a \nwrapper batch file named `perli.cmd` that invokes it.\n\n# Usage\n\nFind brief usage information below; for complete documentation, once installed, run `man perli` (`perli --man` on Windows and if installed manually), or read the [manual online](doc/perli.md).\n\n\u003c!-- DO NOT EDIT THE FENCED CODE BLOCK and RETAIN THIS COMMENT: The fenced code block below is updated by `make update-readme/release` with CLI usage information. --\u003e\n\n```nohighlight\n$ perli --help\n\n\nA simple, convenient Perl REPL for interactive experimentation.\n\n    perli [\u003coptions\u003e]\n\n    --norc      skips loading of the initialization file\n\n    The following Perl options are also supported:\n\n    -M\u003cname\u003e    (repeatable) load a module and import its defaults,  \n                             or activate a pragma (-M-\u003cname\u003e deactivates)\n    -m\u003cmodule\u003e  (repeatable) load a module without importing\n    -I\u003cdir\u003e     (repeatable) prepend \u003cdir\u003e to module search path (@INC)\n\nInitialization file is ~/.perli_rc\n\nStandard options: --help, --man, --version, --home\n```\n\n\u003c!-- DO NOT EDIT THE NEXT CHAPTER and RETAIN THIS COMMENT: The next chapter is updated by `make update-readme/release` with the contents of 'LICENSE.md'. ALSO, LEAVE AT LEAST 1 BLANK LINE AFTER THIS COMMENT. --\u003e\n\n# License\n\nCopyright (c) 2015-2021 Michael Klement \u003cmklement0@gmail.com\u003e (http://same2u.net), released under the [MIT license](https://spdx.org/licenses/MIT#licenseText).\n\n## Acknowledgements\n\nThis project gratefully depends on the following open-source components, according to the terms of their respective licenses.\n\n[npm](https://www.npmjs.com/) dependencies below have optional suffixes denoting the type of dependency; the *absence* of a suffix denotes a required *run-time* dependency: `(D)` denotes a *development-time-only* dependency, `(O)` an *optional* dependency, and `(P)` a *peer* dependency.\n\n\u003c!-- DO NOT EDIT THE NEXT CHAPTER and RETAIN THIS COMMENT: The next chapter is updated by `make update-readme/release` with the dependencies from 'package.json'. ALSO, LEAVE AT LEAST 1 BLANK LINE AFTER THIS COMMENT. --\u003e\n\n## npm dependencies\n\n* [doctoc (D)]()\n* [json (D)](https://github.com/trentm/json)\n* [marked-man (D)](https://github.com/kapouer/marked-man#readme)\n* [replace (D)]()\n* [semver (D)](https://github.com/npm/node-semver#readme)\n* [tap (D)](http://www.node-tap.org/)\n* [urchin (D)](https://git.sdf.org/tlevine/urchin)\n\n\u003c!-- DO NOT EDIT THE NEXT CHAPTER and RETAIN THIS COMMENT: The next chapter is updated by `make update-readme/release` with the contents of 'CHANGELOG.md'. ALSO, LEAVE AT LEAST 1 BLANK LINE AFTER THIS COMMENT. --\u003e\n\n# Changelog\n\nVersioning complies with [semantic versioning (semver)](http://semver.org/).\n\n\u003c!-- NOTE: An entry template for a new version is automatically added each time `make version` is called. Fill in changes afterwards. --\u003e\n\n* **[v0.1.6](https://github.com/mklement0/perli/compare/v0.1.5...v0.1.6)** (2021-04-30):\n  * [enhancement] Package is now installable on Android too, where @matheusfillipe assures me that `perli` works too (tip of the hat for the PR).\n\n* **[v0.1.5](https://github.com/mklement0/perli/compare/v0.1.4...v0.1.5)** (2021-02-23):\n  * [fix] Compatibility with `rlwrap` version 0.45, which in combination with Perl's `exec` function caused a breaking change.\n\n* **[v0.1.4](https://github.com/mklement0/perli/compare/v0.1.3...v0.1.4)** (2019-02-11):\n  * [fix] Ammends v0.1.3 to auto-flush stderr too.\n\n* **[v0.1.3](https://github.com/mklement0/perli/compare/v0.1.2...v0.1.3)** (2019-02-11):\n  * [enhancement] Auto-flushing of stdout activated to support invocation from editors such as [neovim](https://github.com/neovim/neovim) - fixes #4\n\n* **[v0.1.2](https://github.com/mklement0/perli/compare/v0.1.1...v0.1.2)** (2015-09-30):\n  * [fix] Fixed inability to define global variables (without `my`) in older Perl versions (e.g., v5.14).\n\n* **[v0.1.1](https://github.com/mklement0/perli/compare/v0.1.0...v0.1.1)** (2015-09-24):\n  * Project-status corrected in read-me.\n\n* **v0.1.0** (2015-09-24):\n  * Initial release.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmklement0%2Fperli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmklement0%2Fperli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmklement0%2Fperli/lists"}