Devel-REPL-1.003025/000755 000767 000024 00000000000 12222125630 014012 5ustar00etherstaff000000 000000 Devel-REPL-1.003025/Build.PL000644 000767 000024 00000000071 12222125630 015304 0ustar00etherstaff000000 000000 use 5.008001; use Module::Build::Tiny 0.027; Build_PL(); Devel-REPL-1.003025/Changes000644 000767 000024 00000015747 12222125630 015323 0ustar00etherstaff000000 000000 Revision history for Devel-REPL 1.003025 2013-09-29 22:36:59Z (Karen Etheridge) - re-release with fixed prerequisites in metadata 1.003024 2013-09-25 04:07:04Z (Karen Etheridge) - re-release with fixed compile test 1.003023 2013-09-12 00:52:03Z (Karen Etheridge) - The default profile is now "Minimal", not "Default", as Default requires some optional features; Default renamed to Standard (RT#88615) 1.003022 2013-09-10 01:53:10Z (Karen Etheridge) - workaround added for plugins consuming plugins that use optional features - install problems fixed when some optional prereqs are not installed, by properly detecting the lack of features during testing (RT#88542) - spelling fixes (RT#87691, David Steinbrunner) 1.003021 2013-09-09 02:10:45Z (Karen Etheridge) - removed use of deprecated functions from Class::MOP - long-deprecated Devel::REPL::Plugin::NewlineHack removed at last - converted dist to Dist::Zilla, with a different mechanism for specifying optional features (install with cpanm --interactive to be prompted) 1.003020 2013-07-08 - shebang fixed in re.pl so it is rewritten to point to the proper perl at install time (RT#70928) 1.003019 2013-06-27 - Fix "No arguments!" error in Plugin::DDS when nothing to dump (RT#71205, Ash Berlin) - fix failing test when Lexical::Persistence is not installed 1.003018 2013-05-19 - more attempts to fix Term::ReadLine issues in tests (RT#84246, mephinet) 1.003017 2013-04-03 - fix issues with Term::ReadLine:Perl in tests (RT#84246) (thanks, Christopher McCann!) 1.003016 2013-03-26 - make all plugins load again by using native traits (thanks, Zaki Mughal!) (RT#84011) 1.003015 2013-03-01 - fix "Attempt to use reference as lvalue in substr" warning on perl 5.16 (thanks, ilmari!) - plugins that are used by the default profile now default to being installed, fixing RT#83669 and RT#83677 1.003014 2012-10-31 - now using native Moose attribute traits, instead of the deprecated MooseX::AttributeHelper (thanks, Justin Hunter!) - now using namespace::autoclean rather than namespace::clean (thanks, Karen Etheridge!) 1.003013 2012-05-19 - Make Sys::SigAction optional dependency for Win32 systems - Apply some plugin related patchs from Caleb Cushing 1.003012 2010-09-27 - Remove some old code to avoid a future Moose warning 1.003011 2010-06-15 - History plugin now works for Term::ReadLine::Perl - Add ReadLine file completion if no other matches, fixes rt.cpan#58351 - Add a bit more description of Turtle plugin to its POD - Fix rt.cpan#43151 where _-> completion had error - Add some missing functionality to t/load_core.t test coverage - Added docs on quoting and history expansion addressing rt.cpan#48459 1.003010 2010-05-23 - Add exit_repl attribute as a non-signal related way to indicate the REPL should stop running. 1.3.9_02 Unknown - resolve rt.cpan#45879 by implementing Term::ReadLine::Perl support for ReadLineHistory - resolve rt.cpan#55491 by skipping Interrupt test for win32 1.3.9_01 Unknown - Completion works with Term::ReadLine::Perl, which works in win32 etc 1.003009 2010-03-08 - Fix scary Moose 0.98 box, adding a check for ->isa('Devel::REPL') in Meta/Plugin.pm 1.3.8 Unknown - Add doc to a bunch of plugins - Add DDC plugin (like DDS but Data::Dumper::Concise) - resolve rt.cpan#44231 SIGINT does not quit the REPL just kills the line being edited 1.3.7 2009-07-02 - resolve rt.cpan#44919 fix deprecated use of compute_all_applicable_methods 1.3.6 2009-04-10 - had to cut a new release, something went wrong with use of M::I 1.3.5 2009-04-09 - resolve rt.cpan#43807 three Completion drivers not loading Completion plugin - resolve rt.cpan#43808 infinite recursion on Plugin::Commands when Plugin::Packages not loaded - resolve rt.cpan#44902 warning due to deprecated use of alias_method in Plugin.pm - add comment formatting option to the nopaste plugin - add #pastetitle command to Nopaste plugin - If the object we're dumping has stringification overloading, then use it directly 1.003004 2009-02-15 - resolve rt.cpan#43109 Missing deps for Default Profile Plugins 1.003003 2009-02-07 - make Nopaste attribute lazy - make ReadLineHistory history file location portable - resolve rt.cpan#42904 Nopaste plugin handle undef error messages 1.003002 2009-01-21 - make plugins be M::I features so dependencies are optional - resolve rt.cpan#42506 readdir might fail - test use of all plugins supported by Perl core - Add irc nick for oliver 1.003001 2009-01-08 - Fix brokenness in the distribution manifest 1.3.0 Unknown - OutputCache: If sub _ is already defined, then warn about it (once) and refuse to overwrite it - Turn MultiLine::PPI's needs_continuation into a method line_needs_continuation - Cleanup Plugin::Packages - Print a warning when Completion is loaded but the Term::ReadLine object doesn't support completion - Introduce error object for error_return - Make compile return a single value, use is_error to test if it's bad (it's now an error object instead of undef + error str) - Refactor to make it easier to add print/warn to the session - Preserve $^H and %^H when using the LexEnv plugin - Refactor the finding of the last element of the document into a method in Completion - Use namespaace::clean in turtles completion driver - Use Devel::REPL::Plugin instead of Moose::Role - Use "BEFORE_PLUGIN { load_plugin }" instead of "with" - Fix from Sartak for end-of-line comment bug reported by jrockway - Allow exception objects. - Don't initialize a turtles matcher if we don't need to - Improve the MultiLine::PPI plugin by checking whether adding ;; will end in PPI::Statement::Null. If not, then there must be some incomplete structure - Respect env var DEVEL_REPL_PROFILE - - Devel::REPL::Plugin::Peek - Devel::REPL::Plugin::B::Concise - Add CompletionDriver::Turtles - Devel::REPL::Error - Add a Nopaste plugin. #nopaste will publish your current session using App::Nopaste - Add the @INC completion driver. - Devel::REPL::Plugin::CompletionDriver::Globals - Add a PPI plugin for #ppi CODE - CompletionDriver::Methods which currently only works on classnames - FindVariable plugin, which returns a reference to a global variable by name - - Update dependencies - Give "NAME" pod sections to all the plugins - Add AUTHOR sections where I know off the top of my head who wrote the plugin - Expand some of the user documentation 1.002001 2008-02-24 - ship a working version of 1.002000 1.002000 2008-02-24 - fix Plugin to work with latest Moose - deprecate NewlineHack plugin, cause fixed in REPL.pm - OutputCache plugin - MultiLine::PPI plugin - Timing plugin - Interrupt plugin - FancyPrompt plugin - Colors plugin 1.001000 2007-06-27 - profile system - fix up dependencies - DDS plugin - Commands plugin - Plugin metaclass 1.000001 2007-05-29 - unknown 1.000000 2007-05-29 - Initial release Devel-REPL-1.003025/dist.ini000644 000767 000024 00000005507 12222125630 015465 0ustar00etherstaff000000 000000 name = Devel-REPL author = Matt S Trout - mst (at) shadowcatsystems.co.uk (L) copyright_holder = Matt S Trout - mst (at) shadowcatsystems.co.uk (L) license = Perl_5 copyright_year = 2007 [FileFinder::Filter / CoreModules] finder = :InstallModules skip = Devel/REPL/Plugin/(Completion|LexEnv|DDC|DDS|Interrupt|MultiLine/PPI|Nopaste|PPI|Refresh)\.pm$ skip = Devel/REPL/Plugin/CompletionDriver/ [@Author::ETHER] :version = 0.025 -remove = PodWeaver server = p5sagit Authority.authority = cpan:PHAYLON Test::MinimumVersion.max_target_perl = 5.008001 -remove = PodCoverageTests ; XXX TODO -remove = Test::PodSpelling ; XXX TODO -remove = Test::UnusedVars ; XXX TODO AutoPrereqs.finder = CoreModules Test::Compile.module_finder = CoreModules [ExecDir] dir = script [ContributorsFromGit] [Prereqs / RuntimeRequires] Moose = 0.93 MooseX::Object::Pluggable = 0.0009 MooseX::Getopt = 0.18 Task::Weaken = 0 [Prereqs / RuntimeRecommends] PPI::XS = 0.902 [OptionalFeature / Completion] :version = 0.005 -description = Completion plugin - extensible tab completion -always_recommend = 1 -default = 1 PPI = 0 [OptionalFeature / DDS] -description = DDS plugin - better format results with Data::Dump::Streamer -always_recommend = 1 -default = 1 Data::Dump::Streamer = 0 [OptionalFeature / DDC] -description = DDC plugin - even better format results with Data::Dumper::Concise -always_recommend = 1 -default = 1 Data::Dumper::Concise = 0 [OptionalFeature / INC_completion] -description = INC completion driver - tab complete module names in use and require -always_recommend = 1 -default = 1 File::Next = 0 [OptionalFeature / Interrupt] -description = Interrupt plugin - traps SIGINT to kill long-running lines -always_recommend = 1 ; if we were munging Makefile.PL, we would make -default = 1 if $^O !~ /Win32/ -default = 0 Sys::SigAction = 0 [OptionalFeature / Keywords_completion] -description = Keywords completion driver - tab complete Perl keywords and operators -always_recommend = 1 -default = 1 B::Keywords = 0 [OptionalFeature / LexEnv] -description = LexEnv plugin - variables declared with "my" persist between statements -always_recommend = 1 -default = 1 Lexical::Persistence = 0 [OptionalFeature / MultiLine] -description = MultiLine::PPI plugin - continue reading lines until all blocks are closed -always_recommend = 1 -default = 1 PPI = 0 [OptionalFeature / Nopaste] -description = Nopaste plugin - upload a session\'s input and output to a Pastebin -always_recommend = 1 -default = 0 App::Nopaste = 0 [OptionalFeature / PPI] -description = PPI plugin - PPI dumping of Perl code -always_recommend = 1 -default = 1 PPI = 0 [OptionalFeature / Refresh] -description = Refresh plugin - automatically reload libraries with Module::Refresh -always_recommend = 1 -default = 0 Module::Refresh = 0 Devel-REPL-1.003025/examples/000755 000767 000024 00000000000 12222125630 015630 5ustar00etherstaff000000 000000 Devel-REPL-1.003025/INSTALL000644 000767 000024 00000001665 12222125630 015053 0ustar00etherstaff000000 000000 This is the Perl distribution Devel-REPL. Installing Devel-REPL is straightforward. ## Installation with cpanm If you have cpanm, you only need one line: % cpanm Devel::REPL If you are installing into a system-wide directory, you may need to pass the "-S" flag to cpanm, which uses sudo to install the module: % cpanm -S Devel::REPL ## Installing with the CPAN shell Alternatively, if your CPAN shell is set up, you should just be able to do: % cpan Devel::REPL ## Manual installation As a last resort, you can manually install it. Download the tarball, untar it, then build it: % perl Build.PL % ./Build && ./Build test Then install it: % ./Build install If you are installing into a system-wide directory, you may need to run: % sudo ./Build install ## Documentation Devel-REPL documentation is available as POD. You can run perldoc from a shell to read the documentation: % perldoc Devel::REPL Devel-REPL-1.003025/lib/000755 000767 000024 00000000000 12222125630 014560 5ustar00etherstaff000000 000000 Devel-REPL-1.003025/LICENSE000644 000767 000024 00000044211 12222125630 015021 0ustar00etherstaff000000 000000 This software is copyright (c) 2007 by Matt S Trout - mst (at) shadowcatsystems.co.uk (L). This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. Terms of the Perl programming language system itself a) the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version, or b) the "Artistic License" --- The GNU General Public License, Version 1, February 1989 --- This software is Copyright (c) 2007 by Matt S Trout - mst (at) shadowcatsystems.co.uk (L). This is free software, licensed under: The GNU General Public License, Version 1, February 1989 GNU GENERAL PUBLIC LICENSE Version 1, February 1989 Copyright (C) 1989 Free Software Foundation, Inc. 51 Franklin St, Suite 500, Boston, MA 02110-1335 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The license agreements of most software companies try to keep users at the mercy of those companies. By contrast, our General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. The General Public License applies to the Free Software Foundation's software and to any other program whose authors commit to using it. You can use it for your programs, too. When we speak of free software, we are referring to freedom, not price. Specifically, the General Public License is designed to make sure that you have the freedom to give away or sell copies of free software, that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of a such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must tell them their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any work containing the Program or a portion of it, either verbatim or with modifications. Each licensee is addressed as "you". 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this General Public License and to the absence of any warranty; and give any other recipients of the Program a copy of this General Public License along with the Program. You may charge a fee for the physical act of transferring a copy. 2. You may modify your copy or copies of the Program or any portion of it, and copy and distribute such modifications under the terms of Paragraph 1 above, provided that you also do the following: a) cause the modified files to carry prominent notices stating that you changed the files and the date of any change; and b) cause the whole of any work that you distribute or publish, that in whole or in part contains the Program or any part thereof, either with or without modifications, to be licensed at no charge to all third parties under the terms of this General Public License (except that you may choose to grant warranty protection to some or all third parties, at your option). c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the simplest and most usual way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this General Public License. d) You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. Mere aggregation of another independent work with the Program (or its derivative) on a volume of a storage or distribution medium does not bring the other work under the scope of these terms. 3. You may copy and distribute the Program (or a portion or derivative of it, under Paragraph 2) in object code or executable form under the terms of Paragraphs 1 and 2 above provided that you also do one of the following: a) accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Paragraphs 1 and 2 above; or, b) accompany it with a written offer, valid for at least three years, to give any third party free (except for a nominal charge for the cost of distribution) a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Paragraphs 1 and 2 above; or, c) accompany it with the information you received as to where the corresponding source code may be obtained. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form alone.) Source code for a work means the preferred form of the work for making modifications to it. For an executable file, complete source code means all the source code for all modules it contains; but, as a special exception, it need not include source code for modules which are standard libraries that accompany the operating system on which the executable file runs, or for standard header files or definitions files that accompany that operating system. 4. You may not copy, modify, sublicense, distribute or transfer the Program except as expressly provided under this General Public License. Any attempt otherwise to copy, modify, sublicense, distribute or transfer the Program is void, and will automatically terminate your rights to use the Program under this License. However, parties who have received copies, or rights to use copies, from you under this General Public License will not have their licenses terminated so long as such parties remain in full compliance. 5. By copying, distributing or modifying the Program (or any work based on the Program) you indicate your acceptance of this license to do so, and all its terms and conditions. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. 7. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of the license which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the license, you may choose any version ever published by the Free Software Foundation. 8. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to humanity, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19xx name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (a program to direct compilers to make passes at assemblers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice That's all there is to it! --- The Artistic License 1.0 --- This software is Copyright (c) 2007 by Matt S Trout - mst (at) shadowcatsystems.co.uk (L). This is free software, licensed under: The Artistic License 1.0 The Artistic License Preamble The intent of this document is to state the conditions under which a Package may be copied, such that the Copyright Holder maintains some semblance of artistic control over the development of the package, while giving the users of the package the right to use and distribute the Package in a more-or-less customary fashion, plus the right to make reasonable modifications. Definitions: - "Package" refers to the collection of files distributed by the Copyright Holder, and derivatives of that collection of files created through textual modification. - "Standard Version" refers to such a Package if it has not been modified, or has been modified in accordance with the wishes of the Copyright Holder. - "Copyright Holder" is whoever is named in the copyright or copyrights for the package. - "You" is you, if you're thinking about copying or distributing this Package. - "Reasonable copying fee" is whatever you can justify on the basis of media cost, duplication charges, time of people involved, and so on. (You will not be required to justify it to the Copyright Holder, but only to the computing community at large as a market that must bear the fee.) - "Freely Available" means that no fee is charged for the item itself, though there may be fees involved in handling the item. It also means that recipients of the item may redistribute it under the same conditions they received it. 1. You may make and give away verbatim copies of the source form of the Standard Version of this Package without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers. 2. You may apply bug fixes, portability fixes and other modifications derived from the Public Domain or from the Copyright Holder. A Package modified in such a way shall still be considered the Standard Version. 3. You may otherwise modify your copy of this Package in any way, provided that you insert a prominent notice in each changed file stating how and when you changed that file, and provided that you do at least ONE of the following: a) place your modifications in the Public Domain or otherwise make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or placing the modifications on a major archive site such as ftp.uu.net, or by allowing the Copyright Holder to include your modifications in the Standard Version of the Package. b) use the modified Package only within your corporation or organization. c) rename any non-standard executables so the names do not conflict with standard executables, which must also be provided, and provide a separate manual page for each non-standard executable that clearly documents how it differs from the Standard Version. d) make other distribution arrangements with the Copyright Holder. 4. You may distribute the programs of this Package in object code or executable form, provided that you do at least ONE of the following: a) distribute a Standard Version of the executables and library files, together with instructions (in the manual page or equivalent) on where to get the Standard Version. b) accompany the distribution with the machine-readable source of the Package with your modifications. c) accompany any non-standard executables with their corresponding Standard Version executables, giving the non-standard executables non-standard names, and clearly documenting the differences in manual pages (or equivalent), together with instructions on where to get the Standard Version. d) make other distribution arrangements with the Copyright Holder. 5. You may charge a reasonable copying fee for any distribution of this Package. You may charge any fee you choose for support of this Package. You may not charge a fee for this Package itself. However, you may distribute this Package in aggregate with other (possibly commercial) programs as part of a larger (possibly commercial) software distribution provided that you do not advertise this Package as a product of your own. 6. The scripts and library files supplied as input to or produced as output from the programs of this Package do not automatically fall under the copyright of this Package, but belong to whomever generated them, and may be sold commercially, and may be aggregated with this Package. 7. C or perl subroutines supplied by you and linked into this Package shall not be considered part of this Package. 8. The name of the Copyright Holder may not be used to endorse or promote products derived from this software without specific prior written permission. 9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. The End Devel-REPL-1.003025/Makefile.PL000644 000767 000024 00000006273 12222125630 015774 0ustar00etherstaff000000 000000 warn <<'EOW'; *** WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING *** If you're seeing this warning, your toolchain is really, really old and you'll almost certainly have problems installing CPAN modules from this century. But never fear, dear user, for we have the technology to fix this! If you're using CPAN.pm to install things, then you can upgrade it using: cpan CPAN If you're using CPANPLUS to install things, then you can upgrade it using: cpanp CPANPLUS If you're using cpanminus, you shouldn't be seeing this message in the first place, so please file an issue on github. If you're installing manually, please retrain your fingers to run Build.PL when present instead. This public service announcement was brought to you by the Perl Toolchain Gang, the irc.perl.org #toolchain IRC channel, and the number 42. EOW sleep 10 if -t STDIN; # This Makefile.PL for Devel-REPL was generated by # Dist::Zilla::Plugin::MakeMaker::Fallback 0.002. # Don't edit it but the dist.ini used to construct it. use strict; use warnings; use 5.008001; use ExtUtils::MakeMaker 6.30; my %WriteMakefileArgs = ( "ABSTRACT" => "a modern perl interactive shell", "AUTHOR" => "Matt S Trout - mst (at) shadowcatsystems.co.uk (L)", "BUILD_REQUIRES" => {}, "CONFIGURE_REQUIRES" => { "ExtUtils::MakeMaker" => "6.30", "Module::Build::Tiny" => "0.027" }, "DISTNAME" => "Devel-REPL", "EXE_FILES" => [ "script/re.pl", "script/re.pl" ], "LICENSE" => "perl", "NAME" => "Devel::REPL", "PREREQ_PM" => { "B::Concise" => 0, "Devel::Peek" => 0, "File::HomeDir" => 0, "File::Spec" => 0, "Module::Runtime" => 0, "Moose" => "0.93", "Moose::Meta::Role" => 0, "Moose::Role" => 0, "MooseX::Getopt" => "0.18", "MooseX::Object::Pluggable" => "0.0009", "Scalar::Util" => 0, "Task::Weaken" => 0, "Term::ANSIColor" => 0, "Term::ReadLine" => 0, "Time::HiRes" => 0, "namespace::autoclean" => 0, "strict" => 0, "warnings" => 0 }, "TEST_REQUIRES" => { "ExtUtils::MakeMaker" => 0, "File::Spec" => 0, "File::Spec::Functions" => 0, "IO::Handle" => 0, "IPC::Open3" => 0, "List::Util" => 0, "Test::CheckDeps" => "0.007", "Test::Fatal" => 0, "Test::More" => "0.94", "if" => 0 }, "VERSION" => "1.003025", "test" => { "TESTS" => "t/*.t" } ); unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) { my $tr = delete $WriteMakefileArgs{TEST_REQUIRES}; my $br = $WriteMakefileArgs{BUILD_REQUIRES}; for my $mod ( keys %$tr ) { if ( exists $br->{$mod} ) { $br->{$mod} = $tr->{$mod} if $tr->{$mod} > $br->{$mod}; } else { $br->{$mod} = $tr->{$mod}; } } } unless ( eval { ExtUtils::MakeMaker->VERSION(6.56) } ) { my $br = delete $WriteMakefileArgs{BUILD_REQUIRES}; my $pp = $WriteMakefileArgs{PREREQ_PM}; for my $mod ( keys %$br ) { if ( exists $pp->{$mod} ) { $pp->{$mod} = $br->{$mod} if $br->{$mod} > $pp->{$mod}; } else { $pp->{$mod} = $br->{$mod}; } } } delete $WriteMakefileArgs{CONFIGURE_REQUIRES} unless eval { ExtUtils::MakeMaker->VERSION(6.52) }; WriteMakefile(%WriteMakefileArgs); Devel-REPL-1.003025/MANIFEST000644 000767 000024 00000003465 12222125630 015153 0ustar00etherstaff000000 000000 Build.PL Changes INSTALL LICENSE MANIFEST META.json META.yml Makefile.PL README dist.ini examples/dbic_project_profile.pl lib/Devel/REPL.pm lib/Devel/REPL/Error.pm lib/Devel/REPL/Meta/Plugin.pm lib/Devel/REPL/Overview.pod lib/Devel/REPL/Plugin.pm lib/Devel/REPL/Plugin/B/Concise.pm lib/Devel/REPL/Plugin/Colors.pm lib/Devel/REPL/Plugin/Commands.pm lib/Devel/REPL/Plugin/Completion.pm lib/Devel/REPL/Plugin/CompletionDriver/Globals.pm lib/Devel/REPL/Plugin/CompletionDriver/INC.pm lib/Devel/REPL/Plugin/CompletionDriver/Keywords.pm lib/Devel/REPL/Plugin/CompletionDriver/LexEnv.pm lib/Devel/REPL/Plugin/CompletionDriver/Methods.pm lib/Devel/REPL/Plugin/CompletionDriver/Turtles.pm lib/Devel/REPL/Plugin/DDC.pm lib/Devel/REPL/Plugin/DDS.pm lib/Devel/REPL/Plugin/DumpHistory.pm lib/Devel/REPL/Plugin/FancyPrompt.pm lib/Devel/REPL/Plugin/FindVariable.pm lib/Devel/REPL/Plugin/History.pm lib/Devel/REPL/Plugin/Interrupt.pm lib/Devel/REPL/Plugin/LexEnv.pm lib/Devel/REPL/Plugin/MultiLine/PPI.pm lib/Devel/REPL/Plugin/Nopaste.pm lib/Devel/REPL/Plugin/OutputCache.pm lib/Devel/REPL/Plugin/PPI.pm lib/Devel/REPL/Plugin/Packages.pm lib/Devel/REPL/Plugin/Peek.pm lib/Devel/REPL/Plugin/ReadLineHistory.pm lib/Devel/REPL/Plugin/Refresh.pm lib/Devel/REPL/Plugin/ShowClass.pm lib/Devel/REPL/Plugin/Timing.pm lib/Devel/REPL/Plugin/Turtles.pm lib/Devel/REPL/Profile.pm lib/Devel/REPL/Profile/Default.pm lib/Devel/REPL/Profile/Minimal.pm lib/Devel/REPL/Profile/Standard.pm lib/Devel/REPL/Script.pm script/re.pl t/00-check-deps.t t/00-compile.t t/00-report-prereqs.t t/load_core.t t/load_plugins.t xt/release/changes_has_content.t xt/release/cpan-changes.t xt/release/distmeta.t xt/release/eol.t xt/release/kwalitee.t xt/release/minimum-version.t xt/release/mojibake.t xt/release/no-tabs.t xt/release/pod-no404s.t xt/release/pod-syntax.t xt/release/test-version.t Devel-REPL-1.003025/META.json000644 000767 000024 00000070375 12222125630 015447 0ustar00etherstaff000000 000000 { "abstract" : "a modern perl interactive shell", "author" : [ "Matt S Trout - mst (at) shadowcatsystems.co.uk (L)" ], "dynamic_config" : 0, "generated_by" : "Dist::Zilla version 4.300039, CPAN::Meta::Converter version 2.132620", "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : "2" }, "name" : "Devel-REPL", "no_index" : { "directory" : [ "t", "xt", "examples" ] }, "optional_features" : { "Completion" : { "description" : "Completion plugin - extensible tab completion", "prereqs" : { "runtime" : { "requires" : { "PPI" : "0" } } }, "x_default" : "1" }, "DDC" : { "description" : "DDC plugin - even better format results with Data::Dumper::Concise", "prereqs" : { "runtime" : { "requires" : { "Data::Dumper::Concise" : "0" } } }, "x_default" : "1" }, "DDS" : { "description" : "DDS plugin - better format results with Data::Dump::Streamer", "prereqs" : { "runtime" : { "requires" : { "Data::Dump::Streamer" : "0" } } }, "x_default" : "1" }, "INC_completion" : { "description" : "INC completion driver - tab complete module names in use and require", "prereqs" : { "runtime" : { "requires" : { "File::Next" : "0" } } }, "x_default" : "1" }, "Interrupt" : { "description" : "Interrupt plugin - traps SIGINT to kill long-running lines", "prereqs" : { "runtime" : { "requires" : { "Sys::SigAction" : "0" } } }, "x_default" : "0" }, "Keywords_completion" : { "description" : "Keywords completion driver - tab complete Perl keywords and operators", "prereqs" : { "runtime" : { "requires" : { "B::Keywords" : "0" } } }, "x_default" : "1" }, "LexEnv" : { "description" : "LexEnv plugin - variables declared with \"my\" persist between statements", "prereqs" : { "runtime" : { "requires" : { "Lexical::Persistence" : "0" } } }, "x_default" : "1" }, "MultiLine" : { "description" : "MultiLine::PPI plugin - continue reading lines until all blocks are closed", "prereqs" : { "runtime" : { "requires" : { "PPI" : "0" } } }, "x_default" : "1" }, "Nopaste" : { "description" : "Nopaste plugin - upload a session\\'s input and output to a Pastebin", "prereqs" : { "runtime" : { "requires" : { "App::Nopaste" : "0" } } }, "x_default" : "0" }, "PPI" : { "description" : "PPI plugin - PPI dumping of Perl code", "prereqs" : { "runtime" : { "requires" : { "PPI" : "0" } } }, "x_default" : "1" }, "Refresh" : { "description" : "Refresh plugin - automatically reload libraries with Module::Refresh", "prereqs" : { "runtime" : { "requires" : { "Module::Refresh" : "0" } } }, "x_default" : "0" } }, "prereqs" : { "configure" : { "requires" : { "ExtUtils::MakeMaker" : "6.30", "Module::Build::Tiny" : "0.027" } }, "develop" : { "requires" : { "App::Nopaste" : "0", "B::Keywords" : "0", "Data::Dump::Streamer" : "0", "Data::Dumper::Concise" : "0", "Dist::Zilla" : "4.300039", "Dist::Zilla::Plugin::MakeMaker::Fallback" : "0", "Dist::Zilla::Plugin::ModuleBuildTiny" : "0.004", "Dist::Zilla::PluginBundle::Author::ETHER" : "0.025", "File::Next" : "0", "Lexical::Persistence" : "0", "Module::Refresh" : "0", "PPI" : "0", "Sys::SigAction" : "0", "Test::CPAN::Changes" : "0.19", "Test::CPAN::Meta" : "0", "Test::Kwalitee" : "1.08", "Test::More" : "0", "Test::NoTabs" : "0", "Test::Pod" : "1.41" } }, "runtime" : { "recommends" : { "App::Nopaste" : "0", "B::Keywords" : "0", "Data::Dump::Streamer" : "0", "Data::Dumper::Concise" : "0", "File::Next" : "0", "Lexical::Persistence" : "0", "Module::Refresh" : "0", "PPI" : "0", "PPI::XS" : "0.902", "Sys::SigAction" : "0" }, "requires" : { "B::Concise" : "0", "Devel::Peek" : "0", "File::HomeDir" : "0", "File::Spec" : "0", "Module::Runtime" : "0", "Moose" : "0.93", "Moose::Meta::Role" : "0", "Moose::Role" : "0", "MooseX::Getopt" : "0.18", "MooseX::Object::Pluggable" : "0.0009", "Scalar::Util" : "0", "Task::Weaken" : "0", "Term::ANSIColor" : "0", "Term::ReadLine" : "0", "Time::HiRes" : "0", "namespace::autoclean" : "0", "perl" : "5.008001", "strict" : "0", "warnings" : "0" } }, "test" : { "requires" : { "ExtUtils::MakeMaker" : "0", "File::Spec" : "0", "File::Spec::Functions" : "0", "IO::Handle" : "0", "IPC::Open3" : "0", "List::Util" : "0", "Test::CheckDeps" : "0.007", "Test::Fatal" : "0", "Test::More" : "0.94", "if" : "0" } } }, "provides" : { "Devel::REPL" : { "file" : "lib/Devel/REPL.pm", "version" : "1.003025" }, "Devel::REPL::Error" : { "file" : "lib/Devel/REPL/Error.pm", "version" : "1.003025" }, "Devel::REPL::Meta::Plugin" : { "file" : "lib/Devel/REPL/Meta/Plugin.pm", "version" : "1.003025" }, "Devel::REPL::Plugin" : { "file" : "lib/Devel/REPL/Plugin.pm", "version" : "1.003025" }, "Devel::REPL::Plugin::B::Concise" : { "file" : "lib/Devel/REPL/Plugin/B/Concise.pm", "version" : "1.003025" }, "Devel::REPL::Plugin::Colors" : { "file" : "lib/Devel/REPL/Plugin/Colors.pm", "version" : "1.003025" }, "Devel::REPL::Plugin::Commands" : { "file" : "lib/Devel/REPL/Plugin/Commands.pm", "version" : "1.003025" }, "Devel::REPL::Plugin::Completion" : { "file" : "lib/Devel/REPL/Plugin/Completion.pm", "version" : "1.003025" }, "Devel::REPL::Plugin::CompletionDriver::Globals" : { "file" : "lib/Devel/REPL/Plugin/CompletionDriver/Globals.pm", "version" : "1.003025" }, "Devel::REPL::Plugin::CompletionDriver::INC" : { "file" : "lib/Devel/REPL/Plugin/CompletionDriver/INC.pm", "version" : "1.003025" }, "Devel::REPL::Plugin::CompletionDriver::Keywords" : { "file" : "lib/Devel/REPL/Plugin/CompletionDriver/Keywords.pm", "version" : "1.003025" }, "Devel::REPL::Plugin::CompletionDriver::LexEnv" : { "file" : "lib/Devel/REPL/Plugin/CompletionDriver/LexEnv.pm", "version" : "1.003025" }, "Devel::REPL::Plugin::CompletionDriver::Methods" : { "file" : "lib/Devel/REPL/Plugin/CompletionDriver/Methods.pm", "version" : "1.003025" }, "Devel::REPL::Plugin::CompletionDriver::Turtles" : { "file" : "lib/Devel/REPL/Plugin/CompletionDriver/Turtles.pm", "version" : "1.003025" }, "Devel::REPL::Plugin::DDC" : { "file" : "lib/Devel/REPL/Plugin/DDC.pm", "version" : "1.003025" }, "Devel::REPL::Plugin::DDS" : { "file" : "lib/Devel/REPL/Plugin/DDS.pm", "version" : "1.003025" }, "Devel::REPL::Plugin::DumpHistory" : { "file" : "lib/Devel/REPL/Plugin/DumpHistory.pm", "version" : "1.003025" }, "Devel::REPL::Plugin::FancyPrompt" : { "file" : "lib/Devel/REPL/Plugin/FancyPrompt.pm", "version" : "1.003025" }, "Devel::REPL::Plugin::FindVariable" : { "file" : "lib/Devel/REPL/Plugin/FindVariable.pm", "version" : "1.003025" }, "Devel::REPL::Plugin::History" : { "file" : "lib/Devel/REPL/Plugin/History.pm", "version" : "1.003025" }, "Devel::REPL::Plugin::Interrupt" : { "file" : "lib/Devel/REPL/Plugin/Interrupt.pm", "version" : "1.003025" }, "Devel::REPL::Plugin::LexEnv" : { "file" : "lib/Devel/REPL/Plugin/LexEnv.pm", "version" : "1.003025" }, "Devel::REPL::Plugin::MultiLine::PPI" : { "file" : "lib/Devel/REPL/Plugin/MultiLine/PPI.pm", "version" : "1.003025" }, "Devel::REPL::Plugin::Nopaste" : { "file" : "lib/Devel/REPL/Plugin/Nopaste.pm", "version" : "1.003025" }, "Devel::REPL::Plugin::OutputCache" : { "file" : "lib/Devel/REPL/Plugin/OutputCache.pm", "version" : "1.003025" }, "Devel::REPL::Plugin::PPI" : { "file" : "lib/Devel/REPL/Plugin/PPI.pm", "version" : "1.003025" }, "Devel::REPL::Plugin::Packages" : { "file" : "lib/Devel/REPL/Plugin/Packages.pm", "version" : "1.003025" }, "Devel::REPL::Plugin::Packages::DefaultScratchpad" : { "file" : "lib/Devel/REPL/Plugin/Packages.pm", "version" : "1.003025" }, "Devel::REPL::Plugin::Peek" : { "file" : "lib/Devel/REPL/Plugin/Peek.pm", "version" : "1.003025" }, "Devel::REPL::Plugin::ReadLineHistory" : { "file" : "lib/Devel/REPL/Plugin/ReadLineHistory.pm", "version" : "1.003025" }, "Devel::REPL::Plugin::Refresh" : { "file" : "lib/Devel/REPL/Plugin/Refresh.pm", "version" : "1.003025" }, "Devel::REPL::Plugin::ShowClass" : { "file" : "lib/Devel/REPL/Plugin/ShowClass.pm", "version" : "1.003025" }, "Devel::REPL::Plugin::Timing" : { "file" : "lib/Devel/REPL/Plugin/Timing.pm", "version" : "1.003025" }, "Devel::REPL::Plugin::Turtles" : { "file" : "lib/Devel/REPL/Plugin/Turtles.pm", "version" : "1.003025" }, "Devel::REPL::Profile" : { "file" : "lib/Devel/REPL/Profile.pm", "version" : "1.003025" }, "Devel::REPL::Profile::Default" : { "file" : "lib/Devel/REPL/Profile/Default.pm", "version" : "1.003025" }, "Devel::REPL::Profile::Minimal" : { "file" : "lib/Devel/REPL/Profile/Minimal.pm", "version" : "1.003025" }, "Devel::REPL::Profile::Standard" : { "file" : "lib/Devel/REPL/Profile/Standard.pm", "version" : "1.003025" }, "Devel::REPL::Script" : { "file" : "lib/Devel/REPL/Script.pm", "version" : "1.003025" } }, "release_status" : "stable", "resources" : { "bugtracker" : { "mailto" : "bug-Devel-REPL@rt.cpan.org", "web" : "https://rt.cpan.org/Public/Dist/Display.html?Name=Devel-REPL" }, "repository" : { "type" : "git", "url" : "git://git.shadowcat.co.uk/p5sagit/Devel-REPL.git", "web" : "http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit/Devel-REPL.git;a=summary" } }, "version" : "1.003025", "x_Dist_Zilla" : { "perl" : { "version" : "5.019004" }, "plugins" : [ { "class" : "Dist::Zilla::Plugin::FileFinder::Filter", "name" : "CoreModules", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::Git::NextVersion", "name" : "@Author::ETHER/Git::NextVersion", "version" : "2.014" }, { "class" : "Dist::Zilla::Plugin::PromptIfStale", "name" : "@Author::ETHER/build", "version" : "0.006" }, { "class" : "Dist::Zilla::Plugin::PromptIfStale", "name" : "@Author::ETHER/release", "version" : "0.006" }, { "class" : "Dist::Zilla::Plugin::ExecDir", "name" : "@Author::ETHER/ExecDir", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::ShareDir", "name" : "@Author::ETHER/ShareDir", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::FileFinder::ByName", "name" : "@Author::ETHER/Examples", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::Git::GatherDir", "name" : "@Author::ETHER/Git::GatherDir", "version" : "2.014" }, { "class" : "Dist::Zilla::Plugin::MetaYAML", "name" : "@Author::ETHER/MetaYAML", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::MetaJSON", "name" : "@Author::ETHER/MetaJSON", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::License", "name" : "@Author::ETHER/License", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::Readme", "name" : "@Author::ETHER/Readme", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::Manifest", "name" : "@Author::ETHER/Manifest", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::Test::Compile", "config" : { "Dist::Zilla::Plugin::Test::Compile" : { "module_finder" : [ "CoreModules" ], "script_finder" : [ ":ExecFiles", "@Author::ETHER/Examples" ] } }, "name" : "@Author::ETHER/Test::Compile", "version" : "2.033" }, { "class" : "Dist::Zilla::Plugin::Test::CheckDeps", "name" : "@Author::ETHER/Test::CheckDeps", "version" : "0.009" }, { "class" : "Dist::Zilla::Plugin::Test::NoTabs", "config" : { "Dist::Zilla::Plugin::Test::NoTabs" : { "module_finder" : [ ":InstallModules" ], "script_finder" : [ ":ExecFiles", "@Author::ETHER/Examples" ] } }, "name" : "@Author::ETHER/Test::NoTabs", "version" : "0.04" }, { "class" : "Dist::Zilla::Plugin::EOLTests", "name" : "@Author::ETHER/EOLTests", "version" : "0.02" }, { "class" : "Dist::Zilla::Plugin::MetaTests", "name" : "@Author::ETHER/MetaTests", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::Test::Version", "name" : "@Author::ETHER/Test::Version", "version" : "0.002004" }, { "class" : "Dist::Zilla::Plugin::Test::CPAN::Changes", "name" : "@Author::ETHER/Test::CPAN::Changes", "version" : "0.008" }, { "class" : "Dist::Zilla::Plugin::Test::ChangesHasContent", "name" : "@Author::ETHER/Test::ChangesHasContent", "version" : "0.006" }, { "class" : "Dist::Zilla::Plugin::Test::MinimumVersion", "name" : "@Author::ETHER/Test::MinimumVersion", "version" : "2.000005" }, { "class" : "Dist::Zilla::Plugin::PodSyntaxTests", "name" : "@Author::ETHER/PodSyntaxTests", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::Test::Pod::No404s", "name" : "@Author::ETHER/Test::Pod::No404s", "version" : "1.001" }, { "class" : "Dist::Zilla::Plugin::Test::Kwalitee", "name" : "@Author::ETHER/Test::Kwalitee", "version" : "2.06" }, { "class" : "Dist::Zilla::Plugin::MojibakeTests", "name" : "@Author::ETHER/MojibakeTests", "version" : "0.5" }, { "class" : "Dist::Zilla::Plugin::Test::ReportPrereqs", "name" : "@Author::ETHER/Test::ReportPrereqs", "version" : "0.006" }, { "class" : "Dist::Zilla::Plugin::PruneCruft", "name" : "@Author::ETHER/PruneCruft", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::ManifestSkip", "name" : "@Author::ETHER/ManifestSkip", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::Git::Describe", "name" : "@Author::ETHER/Git::Describe", "version" : "0.003" }, { "class" : "Dist::Zilla::Plugin::PkgVersion", "name" : "@Author::ETHER/PkgVersion", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::NextRelease", "name" : "@Author::ETHER/NextRelease", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::AutoMetaResources", "name" : "@Author::ETHER/AutoMetaResources", "version" : "1.20" }, { "class" : "Dist::Zilla::Plugin::Authority", "name" : "@Author::ETHER/Authority", "version" : "1.006" }, { "class" : "Dist::Zilla::Plugin::MetaNoIndex", "name" : "@Author::ETHER/MetaNoIndex", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : "@Author::ETHER/MetaProvides::Package/AUTOVIV/:InstallModulesPM", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::MetaProvides::Package", "config" : { "Dist::Zilla::Plugin::MetaProvides::Package" : {}, "Dist::Zilla::Role::MetaProvider::Provider" : { "inherit_missing" : "1", "inherit_version" : "1", "meta_noindex" : "1" } }, "name" : "@Author::ETHER/MetaProvides::Package", "version" : "1.15000000" }, { "class" : "Dist::Zilla::Plugin::MetaConfig", "name" : "@Author::ETHER/MetaConfig", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::AutoPrereqs", "name" : "@Author::ETHER/AutoPrereqs", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::MinimumPerl", "name" : "@Author::ETHER/MinimumPerl", "version" : "1.003" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "develop", "type" : "requires" } }, "name" : "@Author::ETHER/installer_requirements", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::ReadmeAnyFromPod", "name" : "@Author::ETHER/ReadmeAnyFromPod", "version" : "0.131500" }, { "class" : "Dist::Zilla::Plugin::MakeMaker::Fallback", "name" : "@Author::ETHER/MakeMaker::Fallback", "version" : "0.002" }, { "class" : "Dist::Zilla::Plugin::ModuleBuildTiny", "name" : "@Author::ETHER/ModuleBuildTiny", "version" : "0.005" }, { "class" : "Dist::Zilla::Plugin::InstallGuide", "name" : "@Author::ETHER/InstallGuide", "version" : "1.200001" }, { "class" : "Dist::Zilla::Plugin::CopyFilesFromBuild", "name" : "@Author::ETHER/CopyFilesFromBuild", "version" : "0.103510" }, { "class" : "Dist::Zilla::Plugin::Run::AfterBuild", "name" : "@Author::ETHER/Run::AfterBuild", "version" : "0.020" }, { "class" : "Dist::Zilla::Plugin::RunExtraTests", "name" : "@Author::ETHER/RunExtraTests", "version" : "0.011" }, { "class" : "Dist::Zilla::Plugin::Git::Check", "name" : "@Author::ETHER/Git::Check", "version" : "2.014" }, { "class" : "Dist::Zilla::Plugin::Git::CheckFor::MergeConflicts", "name" : "@Author::ETHER/Git::CheckFor::MergeConflicts", "version" : "0.006" }, { "class" : "Dist::Zilla::Plugin::Git::CheckFor::CorrectBranch", "name" : "@Author::ETHER/Git::CheckFor::CorrectBranch", "version" : "0.006" }, { "class" : "Dist::Zilla::Plugin::Git::Remote::Check", "name" : "@Author::ETHER/Git::Remote::Check", "version" : "0.1.2" }, { "class" : "Dist::Zilla::Plugin::CheckPrereqsIndexed", "name" : "@Author::ETHER/CheckPrereqsIndexed", "version" : "0.009" }, { "class" : "Dist::Zilla::Plugin::TestRelease", "name" : "@Author::ETHER/TestRelease", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::UploadToCPAN", "name" : "@Author::ETHER/UploadToCPAN", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::Git::Commit", "name" : "@Author::ETHER/Git::Commit", "version" : "2.014" }, { "class" : "Dist::Zilla::Plugin::Git::Tag", "name" : "@Author::ETHER/Git::Tag", "version" : "2.014" }, { "class" : "Dist::Zilla::Plugin::Git::Push", "name" : "@Author::ETHER/Git::Push", "version" : "2.014" }, { "class" : "Dist::Zilla::Plugin::InstallRelease", "name" : "@Author::ETHER/InstallRelease", "version" : "0.008" }, { "class" : "Dist::Zilla::Plugin::ConfirmRelease", "name" : "@Author::ETHER/ConfirmRelease", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::ExecDir", "name" : "ExecDir", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::ContributorsFromGit", "name" : "ContributorsFromGit", "version" : "0.006" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "runtime", "type" : "requires" } }, "name" : "RuntimeRequires", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "runtime", "type" : "recommends" } }, "name" : "RuntimeRecommends", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::OptionalFeature", "name" : "Completion", "version" : "0.007" }, { "class" : "Dist::Zilla::Plugin::OptionalFeature", "name" : "DDS", "version" : "0.007" }, { "class" : "Dist::Zilla::Plugin::OptionalFeature", "name" : "DDC", "version" : "0.007" }, { "class" : "Dist::Zilla::Plugin::OptionalFeature", "name" : "INC_completion", "version" : "0.007" }, { "class" : "Dist::Zilla::Plugin::OptionalFeature", "name" : "Interrupt", "version" : "0.007" }, { "class" : "Dist::Zilla::Plugin::OptionalFeature", "name" : "Keywords_completion", "version" : "0.007" }, { "class" : "Dist::Zilla::Plugin::OptionalFeature", "name" : "LexEnv", "version" : "0.007" }, { "class" : "Dist::Zilla::Plugin::OptionalFeature", "name" : "MultiLine", "version" : "0.007" }, { "class" : "Dist::Zilla::Plugin::OptionalFeature", "name" : "Nopaste", "version" : "0.007" }, { "class" : "Dist::Zilla::Plugin::OptionalFeature", "name" : "PPI", "version" : "0.007" }, { "class" : "Dist::Zilla::Plugin::OptionalFeature", "name" : "Refresh", "version" : "0.007" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":InstallModules", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":IncModules", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":TestFiles", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ExecFiles", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ShareFiles", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":MainModule", "version" : "4.300039" } ], "zilla" : { "class" : "Dist::Zilla::Dist::Builder", "config" : { "is_trial" : "0" }, "version" : "4.300039" } }, "x_authority" : "cpan:PHAYLON", "x_contributors" : [ "Arthur Axel 'fREW' Schmidt ", "Ash Berlin ", "Chris Marshall ", "Dagfinn Ilmari Manns\u00e5ker ", "Dave Houston ", "Jesse Luehrs ", "Justin Hunter ", "Karen Etheridge ", "Matt S Trout ", "Norbert Buchmuller ", "Shawn M Moore ", "Stevan Little ", "Tomas Doran (t0m) ", "Zakariyya Mughal ", "acmoore ", "epitaph ", "naquad ", "oliver ", "sukria ", "\u05d9\u05d5\u05d1\u05dc \u05e7\u05d5\u05d2'\u05de\u05df (Yuval Kogman) " ] } Devel-REPL-1.003025/META.yml000644 000767 000024 00000043601 12222125630 015267 0ustar00etherstaff000000 000000 --- abstract: 'a modern perl interactive shell' author: - 'Matt S Trout - mst (at) shadowcatsystems.co.uk (L)' build_requires: ExtUtils::MakeMaker: 0 File::Spec: 0 File::Spec::Functions: 0 IO::Handle: 0 IPC::Open3: 0 List::Util: 0 Test::CheckDeps: 0.007 Test::Fatal: 0 Test::More: 0.94 if: 0 configure_requires: ExtUtils::MakeMaker: 6.30 Module::Build::Tiny: 0.027 dynamic_config: 0 generated_by: 'Dist::Zilla version 4.300039, CPAN::Meta::Converter version 2.132620' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: 1.4 name: Devel-REPL no_index: directory: - t - xt - examples optional_features: Completion: description: 'Completion plugin - extensible tab completion' requires: PPI: 0 DDC: description: 'DDC plugin - even better format results with Data::Dumper::Concise' requires: Data::Dumper::Concise: 0 DDS: description: 'DDS plugin - better format results with Data::Dump::Streamer' requires: Data::Dump::Streamer: 0 INC_completion: description: 'INC completion driver - tab complete module names in use and require' requires: File::Next: 0 Interrupt: description: 'Interrupt plugin - traps SIGINT to kill long-running lines' requires: Sys::SigAction: 0 Keywords_completion: description: 'Keywords completion driver - tab complete Perl keywords and operators' requires: B::Keywords: 0 LexEnv: description: "LexEnv plugin - variables declared with \"my\" persist between statements" requires: Lexical::Persistence: 0 MultiLine: description: 'MultiLine::PPI plugin - continue reading lines until all blocks are closed' requires: PPI: 0 Nopaste: description: "Nopaste plugin - upload a session\\'s input and output to a Pastebin" requires: App::Nopaste: 0 PPI: description: 'PPI plugin - PPI dumping of Perl code' requires: PPI: 0 Refresh: description: 'Refresh plugin - automatically reload libraries with Module::Refresh' requires: Module::Refresh: 0 provides: Devel::REPL: file: lib/Devel/REPL.pm version: 1.003025 Devel::REPL::Error: file: lib/Devel/REPL/Error.pm version: 1.003025 Devel::REPL::Meta::Plugin: file: lib/Devel/REPL/Meta/Plugin.pm version: 1.003025 Devel::REPL::Plugin: file: lib/Devel/REPL/Plugin.pm version: 1.003025 Devel::REPL::Plugin::B::Concise: file: lib/Devel/REPL/Plugin/B/Concise.pm version: 1.003025 Devel::REPL::Plugin::Colors: file: lib/Devel/REPL/Plugin/Colors.pm version: 1.003025 Devel::REPL::Plugin::Commands: file: lib/Devel/REPL/Plugin/Commands.pm version: 1.003025 Devel::REPL::Plugin::Completion: file: lib/Devel/REPL/Plugin/Completion.pm version: 1.003025 Devel::REPL::Plugin::CompletionDriver::Globals: file: lib/Devel/REPL/Plugin/CompletionDriver/Globals.pm version: 1.003025 Devel::REPL::Plugin::CompletionDriver::INC: file: lib/Devel/REPL/Plugin/CompletionDriver/INC.pm version: 1.003025 Devel::REPL::Plugin::CompletionDriver::Keywords: file: lib/Devel/REPL/Plugin/CompletionDriver/Keywords.pm version: 1.003025 Devel::REPL::Plugin::CompletionDriver::LexEnv: file: lib/Devel/REPL/Plugin/CompletionDriver/LexEnv.pm version: 1.003025 Devel::REPL::Plugin::CompletionDriver::Methods: file: lib/Devel/REPL/Plugin/CompletionDriver/Methods.pm version: 1.003025 Devel::REPL::Plugin::CompletionDriver::Turtles: file: lib/Devel/REPL/Plugin/CompletionDriver/Turtles.pm version: 1.003025 Devel::REPL::Plugin::DDC: file: lib/Devel/REPL/Plugin/DDC.pm version: 1.003025 Devel::REPL::Plugin::DDS: file: lib/Devel/REPL/Plugin/DDS.pm version: 1.003025 Devel::REPL::Plugin::DumpHistory: file: lib/Devel/REPL/Plugin/DumpHistory.pm version: 1.003025 Devel::REPL::Plugin::FancyPrompt: file: lib/Devel/REPL/Plugin/FancyPrompt.pm version: 1.003025 Devel::REPL::Plugin::FindVariable: file: lib/Devel/REPL/Plugin/FindVariable.pm version: 1.003025 Devel::REPL::Plugin::History: file: lib/Devel/REPL/Plugin/History.pm version: 1.003025 Devel::REPL::Plugin::Interrupt: file: lib/Devel/REPL/Plugin/Interrupt.pm version: 1.003025 Devel::REPL::Plugin::LexEnv: file: lib/Devel/REPL/Plugin/LexEnv.pm version: 1.003025 Devel::REPL::Plugin::MultiLine::PPI: file: lib/Devel/REPL/Plugin/MultiLine/PPI.pm version: 1.003025 Devel::REPL::Plugin::Nopaste: file: lib/Devel/REPL/Plugin/Nopaste.pm version: 1.003025 Devel::REPL::Plugin::OutputCache: file: lib/Devel/REPL/Plugin/OutputCache.pm version: 1.003025 Devel::REPL::Plugin::PPI: file: lib/Devel/REPL/Plugin/PPI.pm version: 1.003025 Devel::REPL::Plugin::Packages: file: lib/Devel/REPL/Plugin/Packages.pm version: 1.003025 Devel::REPL::Plugin::Packages::DefaultScratchpad: file: lib/Devel/REPL/Plugin/Packages.pm version: 1.003025 Devel::REPL::Plugin::Peek: file: lib/Devel/REPL/Plugin/Peek.pm version: 1.003025 Devel::REPL::Plugin::ReadLineHistory: file: lib/Devel/REPL/Plugin/ReadLineHistory.pm version: 1.003025 Devel::REPL::Plugin::Refresh: file: lib/Devel/REPL/Plugin/Refresh.pm version: 1.003025 Devel::REPL::Plugin::ShowClass: file: lib/Devel/REPL/Plugin/ShowClass.pm version: 1.003025 Devel::REPL::Plugin::Timing: file: lib/Devel/REPL/Plugin/Timing.pm version: 1.003025 Devel::REPL::Plugin::Turtles: file: lib/Devel/REPL/Plugin/Turtles.pm version: 1.003025 Devel::REPL::Profile: file: lib/Devel/REPL/Profile.pm version: 1.003025 Devel::REPL::Profile::Default: file: lib/Devel/REPL/Profile/Default.pm version: 1.003025 Devel::REPL::Profile::Minimal: file: lib/Devel/REPL/Profile/Minimal.pm version: 1.003025 Devel::REPL::Profile::Standard: file: lib/Devel/REPL/Profile/Standard.pm version: 1.003025 Devel::REPL::Script: file: lib/Devel/REPL/Script.pm version: 1.003025 recommends: App::Nopaste: 0 B::Keywords: 0 Data::Dump::Streamer: 0 Data::Dumper::Concise: 0 File::Next: 0 Lexical::Persistence: 0 Module::Refresh: 0 PPI: 0 PPI::XS: 0.902 Sys::SigAction: 0 requires: B::Concise: 0 Devel::Peek: 0 File::HomeDir: 0 File::Spec: 0 Module::Runtime: 0 Moose: 0.93 Moose::Meta::Role: 0 Moose::Role: 0 MooseX::Getopt: 0.18 MooseX::Object::Pluggable: 0.0009 Scalar::Util: 0 Task::Weaken: 0 Term::ANSIColor: 0 Term::ReadLine: 0 Time::HiRes: 0 namespace::autoclean: 0 perl: 5.008001 strict: 0 warnings: 0 resources: bugtracker: https://rt.cpan.org/Public/Dist/Display.html?Name=Devel-REPL repository: git://git.shadowcat.co.uk/p5sagit/Devel-REPL.git version: 1.003025 x_Dist_Zilla: perl: version: 5.019004 plugins: - class: Dist::Zilla::Plugin::FileFinder::Filter name: CoreModules version: 4.300039 - class: Dist::Zilla::Plugin::Git::NextVersion name: '@Author::ETHER/Git::NextVersion' version: 2.014 - class: Dist::Zilla::Plugin::PromptIfStale name: '@Author::ETHER/build' version: 0.006 - class: Dist::Zilla::Plugin::PromptIfStale name: '@Author::ETHER/release' version: 0.006 - class: Dist::Zilla::Plugin::ExecDir name: '@Author::ETHER/ExecDir' version: 4.300039 - class: Dist::Zilla::Plugin::ShareDir name: '@Author::ETHER/ShareDir' version: 4.300039 - class: Dist::Zilla::Plugin::FileFinder::ByName name: '@Author::ETHER/Examples' version: 4.300039 - class: Dist::Zilla::Plugin::Git::GatherDir name: '@Author::ETHER/Git::GatherDir' version: 2.014 - class: Dist::Zilla::Plugin::MetaYAML name: '@Author::ETHER/MetaYAML' version: 4.300039 - class: Dist::Zilla::Plugin::MetaJSON name: '@Author::ETHER/MetaJSON' version: 4.300039 - class: Dist::Zilla::Plugin::License name: '@Author::ETHER/License' version: 4.300039 - class: Dist::Zilla::Plugin::Readme name: '@Author::ETHER/Readme' version: 4.300039 - class: Dist::Zilla::Plugin::Manifest name: '@Author::ETHER/Manifest' version: 4.300039 - class: Dist::Zilla::Plugin::Test::Compile config: Dist::Zilla::Plugin::Test::Compile: module_finder: - CoreModules script_finder: - ':ExecFiles' - '@Author::ETHER/Examples' name: '@Author::ETHER/Test::Compile' version: 2.033 - class: Dist::Zilla::Plugin::Test::CheckDeps name: '@Author::ETHER/Test::CheckDeps' version: 0.009 - class: Dist::Zilla::Plugin::Test::NoTabs config: Dist::Zilla::Plugin::Test::NoTabs: module_finder: - ':InstallModules' script_finder: - ':ExecFiles' - '@Author::ETHER/Examples' name: '@Author::ETHER/Test::NoTabs' version: 0.04 - class: Dist::Zilla::Plugin::EOLTests name: '@Author::ETHER/EOLTests' version: 0.02 - class: Dist::Zilla::Plugin::MetaTests name: '@Author::ETHER/MetaTests' version: 4.300039 - class: Dist::Zilla::Plugin::Test::Version name: '@Author::ETHER/Test::Version' version: 0.002004 - class: Dist::Zilla::Plugin::Test::CPAN::Changes name: '@Author::ETHER/Test::CPAN::Changes' version: 0.008 - class: Dist::Zilla::Plugin::Test::ChangesHasContent name: '@Author::ETHER/Test::ChangesHasContent' version: 0.006 - class: Dist::Zilla::Plugin::Test::MinimumVersion name: '@Author::ETHER/Test::MinimumVersion' version: 2.000005 - class: Dist::Zilla::Plugin::PodSyntaxTests name: '@Author::ETHER/PodSyntaxTests' version: 4.300039 - class: Dist::Zilla::Plugin::Test::Pod::No404s name: '@Author::ETHER/Test::Pod::No404s' version: 1.001 - class: Dist::Zilla::Plugin::Test::Kwalitee name: '@Author::ETHER/Test::Kwalitee' version: 2.06 - class: Dist::Zilla::Plugin::MojibakeTests name: '@Author::ETHER/MojibakeTests' version: 0.5 - class: Dist::Zilla::Plugin::Test::ReportPrereqs name: '@Author::ETHER/Test::ReportPrereqs' version: 0.006 - class: Dist::Zilla::Plugin::PruneCruft name: '@Author::ETHER/PruneCruft' version: 4.300039 - class: Dist::Zilla::Plugin::ManifestSkip name: '@Author::ETHER/ManifestSkip' version: 4.300039 - class: Dist::Zilla::Plugin::Git::Describe name: '@Author::ETHER/Git::Describe' version: 0.003 - class: Dist::Zilla::Plugin::PkgVersion name: '@Author::ETHER/PkgVersion' version: 4.300039 - class: Dist::Zilla::Plugin::NextRelease name: '@Author::ETHER/NextRelease' version: 4.300039 - class: Dist::Zilla::Plugin::AutoMetaResources name: '@Author::ETHER/AutoMetaResources' version: 1.20 - class: Dist::Zilla::Plugin::Authority name: '@Author::ETHER/Authority' version: 1.006 - class: Dist::Zilla::Plugin::MetaNoIndex name: '@Author::ETHER/MetaNoIndex' version: 4.300039 - class: Dist::Zilla::Plugin::FinderCode name: '@Author::ETHER/MetaProvides::Package/AUTOVIV/:InstallModulesPM' version: 4.300039 - class: Dist::Zilla::Plugin::MetaProvides::Package config: Dist::Zilla::Plugin::MetaProvides::Package: {} Dist::Zilla::Role::MetaProvider::Provider: inherit_missing: 1 inherit_version: 1 meta_noindex: 1 name: '@Author::ETHER/MetaProvides::Package' version: 1.15000000 - class: Dist::Zilla::Plugin::MetaConfig name: '@Author::ETHER/MetaConfig' version: 4.300039 - class: Dist::Zilla::Plugin::AutoPrereqs name: '@Author::ETHER/AutoPrereqs' version: 4.300039 - class: Dist::Zilla::Plugin::MinimumPerl name: '@Author::ETHER/MinimumPerl' version: 1.003 - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: develop type: requires name: '@Author::ETHER/installer_requirements' version: 4.300039 - class: Dist::Zilla::Plugin::ReadmeAnyFromPod name: '@Author::ETHER/ReadmeAnyFromPod' version: 0.131500 - class: Dist::Zilla::Plugin::MakeMaker::Fallback name: '@Author::ETHER/MakeMaker::Fallback' version: 0.002 - class: Dist::Zilla::Plugin::ModuleBuildTiny name: '@Author::ETHER/ModuleBuildTiny' version: 0.005 - class: Dist::Zilla::Plugin::InstallGuide name: '@Author::ETHER/InstallGuide' version: 1.200001 - class: Dist::Zilla::Plugin::CopyFilesFromBuild name: '@Author::ETHER/CopyFilesFromBuild' version: 0.103510 - class: Dist::Zilla::Plugin::Run::AfterBuild name: '@Author::ETHER/Run::AfterBuild' version: 0.020 - class: Dist::Zilla::Plugin::RunExtraTests name: '@Author::ETHER/RunExtraTests' version: 0.011 - class: Dist::Zilla::Plugin::Git::Check name: '@Author::ETHER/Git::Check' version: 2.014 - class: Dist::Zilla::Plugin::Git::CheckFor::MergeConflicts name: '@Author::ETHER/Git::CheckFor::MergeConflicts' version: 0.006 - class: Dist::Zilla::Plugin::Git::CheckFor::CorrectBranch name: '@Author::ETHER/Git::CheckFor::CorrectBranch' version: 0.006 - class: Dist::Zilla::Plugin::Git::Remote::Check name: '@Author::ETHER/Git::Remote::Check' version: 0.1.2 - class: Dist::Zilla::Plugin::CheckPrereqsIndexed name: '@Author::ETHER/CheckPrereqsIndexed' version: 0.009 - class: Dist::Zilla::Plugin::TestRelease name: '@Author::ETHER/TestRelease' version: 4.300039 - class: Dist::Zilla::Plugin::UploadToCPAN name: '@Author::ETHER/UploadToCPAN' version: 4.300039 - class: Dist::Zilla::Plugin::Git::Commit name: '@Author::ETHER/Git::Commit' version: 2.014 - class: Dist::Zilla::Plugin::Git::Tag name: '@Author::ETHER/Git::Tag' version: 2.014 - class: Dist::Zilla::Plugin::Git::Push name: '@Author::ETHER/Git::Push' version: 2.014 - class: Dist::Zilla::Plugin::InstallRelease name: '@Author::ETHER/InstallRelease' version: 0.008 - class: Dist::Zilla::Plugin::ConfirmRelease name: '@Author::ETHER/ConfirmRelease' version: 4.300039 - class: Dist::Zilla::Plugin::ExecDir name: ExecDir version: 4.300039 - class: Dist::Zilla::Plugin::ContributorsFromGit name: ContributorsFromGit version: 0.006 - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: runtime type: requires name: RuntimeRequires version: 4.300039 - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: runtime type: recommends name: RuntimeRecommends version: 4.300039 - class: Dist::Zilla::Plugin::OptionalFeature name: Completion version: 0.007 - class: Dist::Zilla::Plugin::OptionalFeature name: DDS version: 0.007 - class: Dist::Zilla::Plugin::OptionalFeature name: DDC version: 0.007 - class: Dist::Zilla::Plugin::OptionalFeature name: INC_completion version: 0.007 - class: Dist::Zilla::Plugin::OptionalFeature name: Interrupt version: 0.007 - class: Dist::Zilla::Plugin::OptionalFeature name: Keywords_completion version: 0.007 - class: Dist::Zilla::Plugin::OptionalFeature name: LexEnv version: 0.007 - class: Dist::Zilla::Plugin::OptionalFeature name: MultiLine version: 0.007 - class: Dist::Zilla::Plugin::OptionalFeature name: Nopaste version: 0.007 - class: Dist::Zilla::Plugin::OptionalFeature name: PPI version: 0.007 - class: Dist::Zilla::Plugin::OptionalFeature name: Refresh version: 0.007 - class: Dist::Zilla::Plugin::FinderCode name: ':InstallModules' version: 4.300039 - class: Dist::Zilla::Plugin::FinderCode name: ':IncModules' version: 4.300039 - class: Dist::Zilla::Plugin::FinderCode name: ':TestFiles' version: 4.300039 - class: Dist::Zilla::Plugin::FinderCode name: ':ExecFiles' version: 4.300039 - class: Dist::Zilla::Plugin::FinderCode name: ':ShareFiles' version: 4.300039 - class: Dist::Zilla::Plugin::FinderCode name: ':MainModule' version: 4.300039 zilla: class: Dist::Zilla::Dist::Builder config: is_trial: 0 version: 4.300039 x_authority: cpan:PHAYLON x_contributors: - "Arthur Axel 'fREW' Schmidt " - 'Ash Berlin ' - 'Chris Marshall ' - 'Dagfinn Ilmari Mannsåker ' - 'Dave Houston ' - 'Jesse Luehrs ' - 'Justin Hunter ' - 'Karen Etheridge ' - 'Matt S Trout ' - 'Norbert Buchmuller ' - 'Shawn M Moore ' - 'Stevan Little ' - 'Tomas Doran (t0m) ' - 'Zakariyya Mughal ' - 'acmoore ' - 'epitaph ' - 'naquad ' - 'oliver ' - 'sukria ' - "יובל קוג'מן (Yuval Kogman) " Devel-REPL-1.003025/README000644 000767 000024 00000000564 12222125630 014677 0ustar00etherstaff000000 000000 This archive contains the distribution Devel-REPL, version 1.003025: a modern perl interactive shell This software is copyright (c) 2007 by Matt S Trout - mst (at) shadowcatsystems.co.uk (L). This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. Devel-REPL-1.003025/script/000755 000767 000024 00000000000 12222125630 015316 5ustar00etherstaff000000 000000 Devel-REPL-1.003025/t/000755 000767 000024 00000000000 12222125630 014255 5ustar00etherstaff000000 000000 Devel-REPL-1.003025/xt/000755 000767 000024 00000000000 12222125630 014445 5ustar00etherstaff000000 000000 Devel-REPL-1.003025/xt/release/000755 000767 000024 00000000000 12222125630 016065 5ustar00etherstaff000000 000000 Devel-REPL-1.003025/xt/release/changes_has_content.t000644 000767 000024 00000002014 12222125630 022244 0ustar00etherstaff000000 000000 #!perl use Test::More tests => 2; note 'Checking Changes'; my $changes_file = 'Changes'; my $newver = '1.003025'; my $trial_token = '-TRIAL'; SKIP: { ok(-e $changes_file, "$changes_file file exists") or skip 'Changes is missing', 1; ok(_get_changes($newver), "$changes_file has content for $newver"); } done_testing; # _get_changes copied and adapted from Dist::Zilla::Plugin::Git::Commit # by Jerome Quelin sub _get_changes { my $newver = shift; # parse changelog to find commit message open(my $fh, '<', $changes_file) or die "cannot open $changes_file: $!"; my $changelog = join('', <$fh>); close $fh; my @content = grep { /^$newver(?:$trial_token)?(?:\s+|$)/ ... /^\S/ } # from newver to un-indented split /\n/, $changelog; shift @content; # drop the version line # drop unindented last line and trailing blank lines pop @content while ( @content && $content[-1] =~ /^(?:\S|\s*$)/ ); # return number of non-blank lines return scalar @content; } Devel-REPL-1.003025/xt/release/cpan-changes.t000644 000767 000024 00000000263 12222125630 020602 0ustar00etherstaff000000 000000 #!perl use strict; use warnings; use Test::More 0.96 tests => 2; use_ok('Test::CPAN::Changes'); subtest 'changes_ok' => sub { changes_file_ok('Changes'); }; done_testing(); Devel-REPL-1.003025/xt/release/distmeta.t000644 000767 000024 00000000217 12222125630 020064 0ustar00etherstaff000000 000000 #!perl use Test::More; eval "use Test::CPAN::Meta"; plan skip_all => "Test::CPAN::Meta required for testing META.yml" if $@; meta_yaml_ok(); Devel-REPL-1.003025/xt/release/eol.t000644 000767 000024 00000000240 12222125630 017025 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; eval 'use Test::EOL'; plan skip_all => 'Test::EOL required' if $@; all_perl_files_ok({ trailing_whitespace => 1 }); Devel-REPL-1.003025/xt/release/kwalitee.t000644 000767 000024 00000000156 12222125630 020061 0ustar00etherstaff000000 000000 # This test is generated by Dist::Zilla::Plugin::Test::Kwalitee use strict; use warnings; use Test::Kwalitee; Devel-REPL-1.003025/xt/release/minimum-version.t000644 000767 000024 00000000271 12222125630 021410 0ustar00etherstaff000000 000000 #!perl use Test::More; eval "use Test::MinimumVersion"; plan skip_all => "Test::MinimumVersion required for testing minimum versions" if $@; all_minimum_version_ok( qq{5.008001} ); Devel-REPL-1.003025/xt/release/mojibake.t000644 000767 000024 00000000406 12222125630 020033 0ustar00etherstaff000000 000000 #!perl use strict; use warnings qw(all); use Test::More; ## no critic (ProhibitStringyEval, RequireCheckingReturnValueOfEval) eval q(use Test::Mojibake); plan skip_all => q(Test::Mojibake required for source encoding testing) if $@; all_files_encoding_ok(); Devel-REPL-1.003025/xt/release/no-tabs.t000644 000767 000024 00000003542 12222125630 017621 0ustar00etherstaff000000 000000 use strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::NoTabs 0.04 use Test::More 0.88; use Test::NoTabs; my @files = ( 'examples/dbic_project_profile.pl', 'lib/Devel/REPL.pm', 'lib/Devel/REPL/Error.pm', 'lib/Devel/REPL/Meta/Plugin.pm', 'lib/Devel/REPL/Overview.pod', 'lib/Devel/REPL/Plugin.pm', 'lib/Devel/REPL/Plugin/B/Concise.pm', 'lib/Devel/REPL/Plugin/Colors.pm', 'lib/Devel/REPL/Plugin/Commands.pm', 'lib/Devel/REPL/Plugin/Completion.pm', 'lib/Devel/REPL/Plugin/CompletionDriver/Globals.pm', 'lib/Devel/REPL/Plugin/CompletionDriver/INC.pm', 'lib/Devel/REPL/Plugin/CompletionDriver/Keywords.pm', 'lib/Devel/REPL/Plugin/CompletionDriver/LexEnv.pm', 'lib/Devel/REPL/Plugin/CompletionDriver/Methods.pm', 'lib/Devel/REPL/Plugin/CompletionDriver/Turtles.pm', 'lib/Devel/REPL/Plugin/DDC.pm', 'lib/Devel/REPL/Plugin/DDS.pm', 'lib/Devel/REPL/Plugin/DumpHistory.pm', 'lib/Devel/REPL/Plugin/FancyPrompt.pm', 'lib/Devel/REPL/Plugin/FindVariable.pm', 'lib/Devel/REPL/Plugin/History.pm', 'lib/Devel/REPL/Plugin/Interrupt.pm', 'lib/Devel/REPL/Plugin/LexEnv.pm', 'lib/Devel/REPL/Plugin/MultiLine/PPI.pm', 'lib/Devel/REPL/Plugin/Nopaste.pm', 'lib/Devel/REPL/Plugin/OutputCache.pm', 'lib/Devel/REPL/Plugin/PPI.pm', 'lib/Devel/REPL/Plugin/Packages.pm', 'lib/Devel/REPL/Plugin/Peek.pm', 'lib/Devel/REPL/Plugin/ReadLineHistory.pm', 'lib/Devel/REPL/Plugin/Refresh.pm', 'lib/Devel/REPL/Plugin/ShowClass.pm', 'lib/Devel/REPL/Plugin/Timing.pm', 'lib/Devel/REPL/Plugin/Turtles.pm', 'lib/Devel/REPL/Profile.pm', 'lib/Devel/REPL/Profile/Default.pm', 'lib/Devel/REPL/Profile/Minimal.pm', 'lib/Devel/REPL/Profile/Standard.pm', 'lib/Devel/REPL/Script.pm', 'script/re.pl' ); notabs_ok($_) foreach @files; done_testing; Devel-REPL-1.003025/xt/release/pod-no404s.t000644 000767 000024 00000000527 12222125630 020065 0ustar00etherstaff000000 000000 #!perl use strict; use warnings; use Test::More; foreach my $env_skip ( qw( SKIP_POD_NO404S AUTOMATED_TESTING ) ){ plan skip_all => "\$ENV{$env_skip} is set, skipping" if $ENV{$env_skip}; } eval "use Test::Pod::No404s"; if ( $@ ) { plan skip_all => 'Test::Pod::No404s required for testing POD'; } else { all_pod_files_ok(); } Devel-REPL-1.003025/xt/release/pod-syntax.t000644 000767 000024 00000000212 12222125630 020353 0ustar00etherstaff000000 000000 #!perl use Test::More; eval "use Test::Pod 1.41"; plan skip_all => "Test::Pod 1.41 required for testing POD" if $@; all_pod_files_ok(); Devel-REPL-1.003025/xt/release/test-version.t000644 000767 000024 00000000643 12222125630 020717 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; # generated by Dist::Zilla::Plugin::Test::Version 0.002004 BEGIN { eval "use Test::Version; 1;" or die $@; } my @imports = ( 'version_all_ok' ); my $params = { is_strict => 1, has_version => 1, }; push @imports, $params if version->parse( $Test::Version::VERSION ) >= version->parse('1.002'); Test::Version->import(@imports); version_all_ok; done_testing; Devel-REPL-1.003025/t/00-check-deps.t000644 000767 000024 00000000435 12222125630 016667 0ustar00etherstaff000000 000000 use strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::CheckDeps 0.009 use Test::More 0.94; use Test::CheckDeps 0.007; check_dependencies('suggests'); if (1) { BAIL_OUT("Missing dependencies") if !Test::More->builder->is_passing; } done_testing; Devel-REPL-1.003025/t/00-compile.t000644 000767 000024 00000005717 12222125630 016321 0ustar00etherstaff000000 000000 use strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::Compile 2.033 use Test::More 0.94 tests => 25 + ($ENV{AUTHOR_TESTING} ? 1 : 0); my @module_files = ( 'Devel/REPL.pm', 'Devel/REPL/Error.pm', 'Devel/REPL/Meta/Plugin.pm', 'Devel/REPL/Plugin.pm', 'Devel/REPL/Plugin/B/Concise.pm', 'Devel/REPL/Plugin/Colors.pm', 'Devel/REPL/Plugin/Commands.pm', 'Devel/REPL/Plugin/DumpHistory.pm', 'Devel/REPL/Plugin/FancyPrompt.pm', 'Devel/REPL/Plugin/FindVariable.pm', 'Devel/REPL/Plugin/History.pm', 'Devel/REPL/Plugin/OutputCache.pm', 'Devel/REPL/Plugin/Packages.pm', 'Devel/REPL/Plugin/Peek.pm', 'Devel/REPL/Plugin/ReadLineHistory.pm', 'Devel/REPL/Plugin/ShowClass.pm', 'Devel/REPL/Plugin/Timing.pm', 'Devel/REPL/Plugin/Turtles.pm', 'Devel/REPL/Profile.pm', 'Devel/REPL/Profile/Default.pm', 'Devel/REPL/Profile/Minimal.pm', 'Devel/REPL/Profile/Standard.pm', 'Devel/REPL/Script.pm' ); my @scripts = ( 'examples/dbic_project_profile.pl', 'script/re.pl' ); # no fake home requested use File::Spec; use IPC::Open3; use IO::Handle; my @warnings; for my $lib (@module_files) { # see L open my $stdin, '<', File::Spec->devnull or die "can't open devnull: $!"; my $stderr = IO::Handle->new; my $pid = open3($stdin, '>&STDERR', $stderr, $^X, '-Mblib', '-e', "require q[$lib]"); binmode $stderr, ':crlf' if $^O eq 'MSWin32'; my @_warnings = <$stderr>; waitpid($pid, 0); is($? >> 8, 0, "$lib loaded ok"); if (@_warnings) { warn @_warnings; push @warnings, @_warnings; } } foreach my $file (@scripts) { SKIP: { open my $fh, '<', $file or warn("Unable to open $file: $!"), next; my $line = <$fh>; close $fh and skip("$file isn't perl", 1) unless $line =~ /^#!.*?\bperl\b\s*(.*)$/; my @flags = $1 ? split(/\s+/, $1) : (); open my $stdin, '<', File::Spec->devnull or die "can't open devnull: $!"; my $stderr = IO::Handle->new; my $pid = open3($stdin, '>&STDERR', $stderr, $^X, '-Mblib', @flags, '-c', $file); binmode $stderr, ':crlf' if $^O eq 'MSWin32'; my @_warnings = <$stderr>; waitpid($pid, 0); is($? >> 8, 0, "$file compiled ok"); # in older perls, -c output is simply the file portion of the path being tested if (@_warnings = grep { !/\bsyntax OK$/ } grep { chomp; $_ ne (File::Spec->splitpath($file))[2] } @_warnings) { # temporary measure - win32 newline issues? warn map { _show_whitespace($_) } @_warnings; push @warnings, @_warnings; } } } sub _show_whitespace { my $string = shift; $string =~ s/\012/[\\012]/g; $string =~ s/\015/[\\015]/g; $string =~ s/\t/[\\t]/g; $string =~ s/ /[\\s]/g; return $string; } is(scalar(@warnings), 0, 'no warnings found') if $ENV{AUTHOR_TESTING}; BAIL_OUT("Compilation problems") if !Test::More->builder->is_passing; Devel-REPL-1.003025/t/00-report-prereqs.t000644 000767 000024 00000003764 12222125630 017663 0ustar00etherstaff000000 000000 #!perl use strict; use warnings; use Test::More tests => 1; use ExtUtils::MakeMaker; use File::Spec::Functions; use List::Util qw/max/; my @modules = qw( App::Nopaste B::Concise B::Keywords Data::Dump::Streamer Data::Dumper::Concise Devel::Peek ExtUtils::MakeMaker File::HomeDir File::Next File::Spec File::Spec::Functions IO::Handle IPC::Open3 Lexical::Persistence List::Util Module::Build::Tiny Module::Refresh Module::Runtime Moose Moose::Meta::Role Moose::Role MooseX::Getopt MooseX::Object::Pluggable PPI PPI::XS Scalar::Util Sys::SigAction Task::Weaken Term::ANSIColor Term::ReadLine Test::CheckDeps Test::Fatal Test::More Time::HiRes if namespace::autoclean perl strict warnings ); # replace modules with dynamic results from MYMETA.json if we can # (hide CPAN::Meta from prereq scanner) my $cpan_meta = "CPAN::Meta"; if ( -f "MYMETA.json" && eval "require $cpan_meta" ) { ## no critic if ( my $meta = eval { CPAN::Meta->load_file("MYMETA.json") } ) { my $prereqs = $meta->prereqs; delete $prereqs->{develop}; my %uniq = map {$_ => 1} map { keys %$_ } map { values %$_ } values %$prereqs; $uniq{$_} = 1 for @modules; # don't lose any static ones @modules = sort keys %uniq; } } my @reports = [qw/Version Module/]; for my $mod ( @modules ) { next if $mod eq 'perl'; my $file = $mod; $file =~ s{::}{/}g; $file .= ".pm"; my ($prefix) = grep { -e catfile($_, $file) } @INC; if ( $prefix ) { my $ver = MM->parse_version( catfile($prefix, $file) ); $ver = "undef" unless defined $ver; # Newer MM should do this anyway push @reports, [$ver, $mod]; } else { push @reports, ["missing", $mod]; } } if ( @reports ) { my $vl = max map { length $_->[0] } @reports; my $ml = max map { length $_->[1] } @reports; splice @reports, 1, 0, ["-" x $vl, "-" x $ml]; diag "Prerequisite Report:\n", map {sprintf(" %*s %*s\n",$vl,$_->[0],-$ml,$_->[1])} @reports; } pass; # vim: ts=2 sts=2 sw=2 et: Devel-REPL-1.003025/t/load_core.t000755 000767 000024 00000003752 12222125630 016403 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use if $ENV{AUTHOR_TESTING}, 'Test::Warnings'; use Module::Runtime 'use_module'; use Test::Fatal; _use_ok('Devel::REPL'); _use_ok('Devel::REPL::Script'); _use_ok('Devel::REPL::Plugin::Colors'); _use_ok('Devel::REPL::Plugin::Commands'); SKIP: { eval 'use PPI; 1' or skip 'PPI not installed: skipping completion plugins', 6; _use_ok('Devel::REPL::Plugin::Completion'); _use_ok('Devel::REPL::Plugin::CompletionDriver::Globals'); _use_ok('Devel::REPL::Plugin::CompletionDriver::Methods'); _use_ok('Devel::REPL::Plugin::CompletionDriver::Turtles'); test_plugin('File::Next', 'CompletionDriver::INC'); test_plugin('B::Keywords', 'CompletionDriver::Keywords'); test_plugin('Lexical::Persistence', 'CompletionDriver::LexEnv'); }; test_plugin('Lexical::Persistence', 'LexEnv'); test_plugin('Data::Dumper::Concise', 'DDC'); test_plugin('Data::Dump::Streamer', 'DDS'); _use_ok('Devel::REPL::Plugin::DumpHistory'); _use_ok('Devel::REPL::Plugin::FancyPrompt'); _use_ok('Devel::REPL::Plugin::FindVariable'); _use_ok('Devel::REPL::Plugin::History'); test_plugin('Sys::SigAction', 'Interrupt'); # _use_ok('Devel::REPL::Plugin::Interrupt') unless $^O eq 'MSWin32'; test_plugin('PPI', 'MultiLine::PPI'); test_plugin('App::Nopaste', 'Nopaste'); _use_ok('Devel::REPL::Plugin::OutputCache'); _use_ok('Devel::REPL::Plugin::Packages'); _use_ok('Devel::REPL::Plugin::Peek'); test_plugin('PPI' ,'PPI'); _use_ok('Devel::REPL::Plugin::ReadLineHistory'); test_plugin('Module::Refresh', 'Refresh'); _use_ok('Devel::REPL::Plugin::ShowClass'); _use_ok('Devel::REPL::Plugin::Timing'); _use_ok('Devel::REPL::Plugin::Turtles'); sub _use_ok { my $module = shift; is(exception { use_module $module }, undef, $module . ' ok'); } sub test_plugin { my ($prereq, $plugin) = @_; SKIP: { eval "use $prereq; 1" or skip "$prereq not installed: skipping $plugin", 1; _use_ok("Devel::REPL::Plugin::$plugin"); } } done_testing; Devel-REPL-1.003025/t/load_plugins.t000755 000767 000024 00000002535 12222125630 017132 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use if $ENV{AUTHOR_TESTING}, 'Test::Warnings'; use_ok('Devel::REPL'); my @plugins = qw/ B::Concise Colors Commands Completion CompletionDriver::Globals CompletionDriver::INC CompletionDriver::Keywords CompletionDriver::LexEnv CompletionDriver::Methods CompletionDriver::Turtles DDC DDS DumpHistory FancyPrompt FindVariable History Interrupt LexEnv MultiLine::PPI Nopaste OutputCache PPI Packages Peek ReadLineHistory Refresh ShowClass Timing Turtles /; # one $repl is shared: # "Looks like the problem is that you can't open multiple instances of # Term::ReadLine:Perl from the same object. I was able to correct this by # changing the test to reuse the same Devel::REPL instance each time. This # prevents the warning that causes the test to fail. I don't think this # changes the spirit of the test, it's just a byproduct of how # Term::ReadLine::Perl works." -- RT#84246 my $repl = Devel::REPL->new; for my $plugin_name (@plugins) { test_load_plugin($plugin_name); } sub test_load_plugin { my ($plugin_name) = @_; my $test_name = "plugin $plugin_name loaded"; SKIP: { eval "use Devel::REPL::Plugin::$plugin_name; 1" or skip "could not eval plugin $plugin_name", 1; ok(eval { $repl->load_plugin($plugin_name); 1 }, $test_name) or diag $@; } } done_testing; Devel-REPL-1.003025/script/re.pl000755 000767 000024 00000000141 12222125630 016260 0ustar00etherstaff000000 000000 #!perl use Devel::REPL::Script; Devel::REPL::Script->import('run'); # should be called 'run' Devel-REPL-1.003025/lib/Devel/000755 000767 000024 00000000000 12222125630 015617 5ustar00etherstaff000000 000000 Devel-REPL-1.003025/lib/Devel/REPL/000755 000767 000024 00000000000 12222125630 016361 5ustar00etherstaff000000 000000 Devel-REPL-1.003025/lib/Devel/REPL.pm000644 000767 000024 00000025516 12222125630 016730 0ustar00etherstaff000000 000000 package Devel::REPL; BEGIN { $Devel::REPL::AUTHORITY = 'cpan:PHAYLON'; } { $Devel::REPL::VERSION = '1.003025'; } # git description: v1.003024-3-g9d73eaa use Term::ReadLine; use Moose; use namespace::autoclean; use 5.008001; # backwards compat, doesn't warn like 5.8.1 with 'MooseX::Object::Pluggable'; use Devel::REPL::Error; has 'term' => ( is => 'rw', lazy => 1, default => sub { Term::ReadLine->new('Perl REPL') } ); has 'prompt' => ( is => 'rw', default => sub { '$ ' } ); has 'out_fh' => ( is => 'rw', lazy => 1, default => sub { shift->term->OUT || \*STDOUT; } ); has 'exit_repl' => ( is => 'rw', default => sub { 0 } ); sub run { my ($self) = @_; while ($self->run_once_safely) { # keep looping unless we want to exit REPL last if $self->exit_repl; } } sub run_once_safely { my ($self, @args) = @_; my $ret = eval { $self->run_once(@args) }; if ($@) { my $error = $@; eval { $self->print("Error! - $error\n"); }; return 1; } else { return $ret; } } sub run_once { my ($self) = @_; my $line = $self->read; return unless defined($line); # undefined value == EOF my @ret = $self->formatted_eval($line); $self->print(@ret) unless $self->exit_repl; return 1; } sub formatted_eval { my ( $self, @args ) = @_; my @ret = $self->eval(@args); return $self->format(@ret); } sub format { my ( $self, @stuff ) = @_; if ( $self->is_error($stuff[0]) ) { return $self->format_error(@stuff); } else { return $self->format_result(@stuff); } } sub format_result { my ( $self, @stuff ) = @_; return @stuff; } sub format_error { my ( $self, $error ) = @_; return $error->stringify; } sub is_error { my ( $self, $thingy ) = @_; blessed($thingy) and $thingy->isa("Devel::REPL::Error"); } sub read { my ($self) = @_; return $self->term->readline($self->prompt); } sub eval { my ($self, $line) = @_; my $compiled = $self->compile($line); return $compiled unless defined($compiled) and not $self->is_error($compiled); return $self->execute($compiled); } sub compile { my ( $_REPL, @args ) = @_; my $compiled = eval $_REPL->wrap_as_sub(@args); return $_REPL->error_return("Compile error", $@) if $@; return $compiled; } sub wrap_as_sub { my ($self, $line, %args) = @_; return qq!sub {\n!. ( $args{no_mangling} ? $line : $self->mangle_line($line) ).qq!\n}\n!; } sub mangle_line { my ($self, $line) = @_; return $line; } sub execute { my ($self, $to_exec, @args) = @_; my @ret = eval { $to_exec->(@args) }; return $self->error_return("Runtime error", $@) if $@; return @ret; } sub error_return { my ($self, $type, $error) = @_; return Devel::REPL::Error->new( type => $type, message => $error ); } sub print { my ($self, @ret) = @_; my $fh = $self->out_fh; no warnings 'uninitialized'; print $fh "@ret"; print $fh "\n" if $self->term->ReadLine =~ /Gnu/; } =head1 NAME Devel::REPL - a modern perl interactive shell =head1 SYNOPSIS my $repl = Devel::REPL->new; $repl->load_plugin($_) for qw(History LexEnv); $repl->run Alternatively, use the 're.pl' script installed with the distribution system$ re.pl =head1 DESCRIPTION This is an interactive shell for Perl, commonly known as a REPL - Read, Evaluate, Print, Loop. The shell provides for rapid development or testing of code without the need to create a temporary source code file. Through a plugin system, many features are available on demand. You can also tailor the environment through the use of profiles and run control files, for example to pre-load certain Perl modules when working on a particular project. =head1 USAGE To start a shell, follow one of the examples in the L above. Once running, the shell accepts and will attempt to execute any code given. If the code executes successfully you'll be shown the result, otherwise an error message will be returned. Here are a few examples: $_ print "Hello, world!\n" Hello, world! 1 $_ nosuchfunction Compile error: Bareword "nosuchfunction" not allowed while "strict subs" in use at (eval 130) line 5. $_ In the first example above you see the output of the command (C), if any, and then the return value of the statement (C<1>). Following that example, an error is returned when the execution of some code fails. Note that the lack of semicolon on the end is not a mistake - the code is run inside a Block structure (to protect the REPL in case the code blows up), which means a single statement doesn't require the semicolon. You can add one if you like, though. If you followed the first example in the L above, you'll have the History and LexEnv plugins loaded (and there are many more available). Although the shell might support "up-arrow" history, the History plugin adds "bang" history to that so you can re-execute chosen commands (with e.g. C). The LexEnv plugin ensures that lexical variables declared with the C keyword will automatically persist between statements executed in the REPL shell. When you C any Perl module, the C will work as expected - the exported functions from that module are available for immediate use: $_ carp "I'm dieeeing!\n" String found where operator expected at (eval 129) line 5, near "carp "I'm dieeeing!\n"" (Do you need to predeclare carp?) Compile error: syntax error at (eval 129) line 5, near "carp "I'm dieeeing!\n"" BEGIN not safe after errors--compilation aborted at (eval 129) line 5. $_ use Carp $_ carp "I'm dieeeing!\n" I'm dieeeing! at /usr/share/perl5/Lexical/Persistence.pm line 327 1 $_ To quit from the shell, hit C or C. MSWin32 NOTE: control keys won't work if TERM=dumb because readline functionality will be disabled. =head2 Run Control Files For particular projects you might well end up running the same commands each time the REPL shell starts up - loading Perl modules, setting configuration, and so on. A run control file lets you have this done automatically, and you can have multiple files for different projects. By default the C program looks for C<< $HOME/.re.pl/repl.rc >>, and runs whatever code is in there as if you had entered it at the REPL shell yourself. To set a new run control file that's also in that directory, pass it as a filename like so: system$ re.pl --rcfile myproject.pc If the filename happens to contain a forward slash, then it's used absolutely, or realive to the current working directory: system$ re.pl --rcfile /path/to/my/project/repl.rc Within the run control file you might want to load plugins. This is covered in L section, below. =head2 Profiles To allow for the sharing of run control files, you can fashion them into a Perl module for distribution (perhaps via the CPAN). For more information on this feature, please see the L manual page. A C profile ships with C; it loads the following plugins (note that some of these require optional features -- or you can also use the C profile): =over 4 =item * L =item * L =item * L =item * L =item * L =item * L =item * L =item * L =item * L =item * L =item * L =item * L =item * L =back =head2 Plugins Plugins are a way to add functionality to the REPL shell, and take advantage of C being based on the L object system for Perl 5. This means it's simple to 'hook into' many steps of the R-E-P-L process. Plugins can change the way commands are interpreted, or the way their results are output, or even add commands to the shell environment. A number of plugins ship with C, and more are available on the CPAN. Some of the shipped plugins are loaded in the default profile, mentioned above. These plugins can be loaded in your C<< $HOME/.re.pl/repl.rc >> like: load_plugin qw( CompletionDriver::Global DumpHistory ); Writing your own plugins is not difficult, and is discussed in the L manual page, along with links to the manual pages of all the plugins shipped with C. =head2 The REPL shell object From time to time you'll want to interact with or manipulate the C shell object itself; that is, the instance of the shell you're currently running. The object is always available through the C<$_REPL> variable. One common requirement is to load an additional plugin, after your profile and run control files have already been executed: $_ $_REPL->load_plugin('Timing'); 1 $_ print "Hello again, world!\n" Hello again, world! Took 0.00148296356201172 seconds. 1 $_ =head1 OPTIONAL FEATURES In addition to the prerequisites declared in this distribution, which should be automatically installed by your L client, there are a number of optional features, used by additional plugins. You can install any of these features by installing this distribution interactively (e.g. C). =for comment I hope to automatically generate this data via a Pod::Weaver section =over 4 =item * Completion plugin - extensible tab completion =item * DDS plugin - better format results with Data::Dump::Streamer =item * DDC plugin - even better format results with Data::Dumper::Concise =item * INC completion driver - tab complete module names in use and require =item * Interrupt plugin - traps SIGINT to kill long-running lines =item * Keywords completion driver - tab complete Perl keywords and operators =item * LexEnv plugin - variables declared with "my" persist between statements =item * MultiLine::PPI plugin - continue reading lines until all blocks are closed =item * Nopaste plugin - upload a session\'s input and output to a Pastebin =item * PPI plugin - PPI dumping of Perl code =item * Refresh plugin - automatically reload libraries with Module::Refresh =back =head1 AUTHOR Matt S Trout - mst (at) shadowcatsystems.co.uk (L) =head1 CONTRIBUTORS =over 4 =item Stevan Little - stevan (at) iinteractive.com =item Alexis Sukrieh - sukria+perl (at) sukria.net =item epitaph =item mgrimes - mgrimes (at) cpan dot org =item Shawn M Moore - sartak (at) gmail.com =item Oliver Gorwits - oliver on irc.perl.org =item Andrew Moore - C<< >> =item Norbert Buchmuller C<< >> =item Dave Houston C<< >> =item Chris Marshall =item Karen Etheridge C<< >> =back =head1 LICENSE This library is free software under the same terms as perl itself =cut 1; Devel-REPL-1.003025/lib/Devel/REPL/Error.pm000644 000767 000024 00000000732 12222125630 020012 0ustar00etherstaff000000 000000 package Devel::REPL::Error; BEGIN { $Devel::REPL::Error::AUTHORITY = 'cpan:PHAYLON'; } { $Devel::REPL::Error::VERSION = '1.003025'; } use Moose; # FIXME get nothingmuch to refactor and release his useful error object has type => ( isa => "Str", is => "ro", required => 1, ); has message => ( isa => "Str|Object", is => "ro", required => 1, ); sub stringify { my $self = shift; sprintf "%s: %s", $self->type, $self->message; } __PACKAGE__ __END__ Devel-REPL-1.003025/lib/Devel/REPL/Meta/000755 000767 000024 00000000000 12222125630 017247 5ustar00etherstaff000000 000000 Devel-REPL-1.003025/lib/Devel/REPL/Overview.pod000644 000767 000024 00000013371 12222125630 020700 0ustar00etherstaff000000 000000 =head1 NAME Devel::REPL::Overview - overview of Devel::REPL. =head1 DESCRIPTION =head2 What is a console? How it can assist you? Most modern languages have consoles. Console is an interactive tool that evaluates your input while you type it. It gives you several advantages: =over 2 =item * Quickly test some thought or tricky expression =item * Run some code bigger than one line without a temporary file =item * Play around with libraries and modules =item * You can even call a console in your script and play around in script's context =back For Ruby it would be irb, for Python is... python by itself and for perl... and there was nothing for perl (except that ugly perl -d -e "" and several failed projects) until Devel::REPL was written by Matt S Trout (a.k.a. mst) from ShadowCatSystems L. =head2 Devel::REPL - the Perl console REPL stands for Read, Evaluate, Print, Loop. Lets install and try it. $ cpan Devel::REPL After installation you have a lot of new modules, but the most interesting things are: =over 2 =item * Devel::REPL A top level module. =item * re.pl Wrapper script, running console. =back And a bunch of plugins (I'll describe them later). In command line type: $ re.pl If everything is ok you'll see a prompt (underlined $). That's it. You can start typing expressions. An example session: $ sub factorial { > my $number = shift; > return $number > 1 ? $number * factorial($number-1) : $number; > } $ factorial 1 # by the way, comments are allowed 1 # our return value $ factorial 5 120 $ [1,2,3,4,5,6,7] $ARRAY1 = [ 1, 2, 3, # return values are printed with Data::Dumper::Streamer. 4, # See Plugins section 5, 6, 7 ]; $ {apple=>1,fruit=>'apple',cart=>['apple','banana']} $HASH1 = { apple => 1, cart => [ 'apple', 'banana' ], fruit => 'apple' }; $ package MyPackage; # create a package $ sub say_hi { # define a sub > print "Hi!\n"; > } # statement is evaluated only after we've finished typing block. # See Plugins section. > __PACKAGE__ MyPackage > package main; > __PACKAGE_ main > MyPackage->say_hi Hi! 1 $ =head2 Control files a.k.a. I don't want to type it every time Devel::REPL has control files feature. Control files are evaluated on session start in the same way as you would type them manually in console. Default control file is located at `$HOME/.re.pl/repl.rc` . You can store there any statements you would normally type in. I.e. my `$HOME/.re.pl/repl.rc` has next lines: use feature 'say'; # to don't write \n all the time use Data::Dumper; # pretty print data structures sub pp { print Data::Dumper->Dump([@_]) } You can have multiple control files and they can be anywhere in the file system. To make re.pl use some rc-file other than repl.rc call it like this: $ re.pl --rcfile /path/to/your/rc.file If your rc-file is in `$HOME/.re.pl` directory, you can omit path: $ re.pl --rcfile rc.file If you have rc-file with the same name in current directory and you don't want to type path, you can: $ re.pl --rcfile ./rc.file =head2 I want it to bark, fly, jump and swim! or Plugins Plugins extend functionality and change behavior of Devel::REPL. Bundled plugins are: =over 2 =item * Devel::REPL::Plugin::History No comments. Simply history. =item * Devel::REPL::Plugin::!LexEnv Provides a lexical environment for the Devel::REPL. =item * Devel::REPL::Plugin::DDS Formats return values with Data::Dump::Streamer module. =item * Devel::REPL::Plugin::Packages Keeps track of which package your're in. =item * Devel::REPL::Plugin::Commands Generic command creation plugin using injected functions. =item * Devel::REPL::Plugin::MultiLine::PPI Makes Devel::REPL read your input until your block is finished. What does this means: you can type a part of a block on one line and second part on another: $ sub mysub { > print "Hello, World!\n"; ## notice prompt change > } $ mysub Hello, World! 1 $ but this *doesn't* mean you can print sub name or identifier on several lines. Don't do that! It won't work. =back There are lots of contributed plugins you can find at CPAN. =head1 Profiles If plugins change and extend functionality of Devel::REPL, profiles are changing your environment (loaded plugins, constants, subs and etc.). For example, the Minimal profile, `Devel::REPL::Profile::Minimal`: package Devel::REPL::Profile::Minimal; use Moose; ### advanced OOP system for Perl ### keep those exports/imports out of our namespace use namespace::autoclean; with 'Devel::REPL::Profile'; ## seem perldoc Muse sub plugins { ### plugins we want to be loaded qw(History LexEnv DDS Packages Commands MultiLine::PPI); } ### the only required sub for profile, ### it is called on profile activation sub apply_profile { my ($self, $repl) = @_; ### $self - no comments, $repl - current instance of Devel::REPL $repl->load_plugin($_) for $self->plugins; ### load our plugins } 1; There is also the 'Standard' profile, which contains a number of optional (yet very useful) features. To enable some profile use --profile switch: $ re.pl --profile SomeProfile Alternatively, you can set the environment variable C to C, or set the C key in your C (see L for more information). =head1 See Also L, L, L Devel-REPL-1.003025/lib/Devel/REPL/Plugin/000755 000767 000024 00000000000 12222125630 017617 5ustar00etherstaff000000 000000 Devel-REPL-1.003025/lib/Devel/REPL/Plugin.pm000644 000767 000024 00000000525 12222125630 020157 0ustar00etherstaff000000 000000 package Devel::REPL::Plugin; BEGIN { $Devel::REPL::Plugin::AUTHORITY = 'cpan:PHAYLON'; } { $Devel::REPL::Plugin::VERSION = '1.003025'; } use strict; use warnings; use Devel::REPL::Meta::Plugin; use Moose::Role (); sub import { my $target = caller; Devel::REPL::Meta::Plugin->initialize($target); goto &Moose::Role::import; } 1; Devel-REPL-1.003025/lib/Devel/REPL/Profile/000755 000767 000024 00000000000 12222125630 017761 5ustar00etherstaff000000 000000 Devel-REPL-1.003025/lib/Devel/REPL/Profile.pm000644 000767 000024 00000004777 12222125630 020336 0ustar00etherstaff000000 000000 package Devel::REPL::Profile; BEGIN { $Devel::REPL::Profile::AUTHORITY = 'cpan:PHAYLON'; } { $Devel::REPL::Profile::VERSION = '1.003025'; } use Moose::Role; requires 'apply_profile'; =head1 NAME Devel::REPL::Profile =head1 SYNOPSIS package Devel::REPL::Profile::MyProject; use Moose; use namespace::autoclean; with 'Devel::REPL::Profile'; sub apply_profile { my ($self, $repl) = @_; # do something here } 1; =head1 DESCRIPTION For particular projects you might well end up running the same commands each time the REPL shell starts up - loading Perl modules, setting configuration, and so on. A mechanism called I exists to let you package and distribute these start-up scripts, as Perl modules. =head1 USAGE Quite simply, follow the L section above to create a boilerplate profile module. Within the C method, the C<$repl> variable can be used to run any commands as the user would, within the context of their running C shell instance. For example, to load a module, you might have something like this: sub apply_profile { my ($self, $repl) = @_; $repl->eval('use Carp'); } As you can see, the C method is used to run any code. The user won't see any output from that, and the code can "safely" die without destroying the REPL shell. The return value of C will be the return value of the code you gave, or else if it died then a C object is returned. If you want to load a C plugin, then use the following method: $repl->load_plugin('Timing'); The C and C methods should cover most of what you would want to do before the user has access to the shell. Remember that plugin features are immediately available, so you can load for example the C plugin, and then declare C variables which the user will have access to. =head2 Selecting a Profile To run the shell with a particular profile, use the following command: system$ re.pl --profile MyProject Alternatively, you can set the environment variable C to MyProject. When the profile name is unqualified, as in the above example, the profile is assumed to be in the C namespace. Otherwise if you pass something which contains the C<::> character sequence, it will be loaded as-is. =head1 AUTHOR Matt S Trout - mst (at) shadowcatsystems.co.uk (L) =head1 LICENSE This library is free software under the same terms as perl itself =cut 1; Devel-REPL-1.003025/lib/Devel/REPL/Script.pm000644 000767 000024 00000004366 12222125630 020174 0ustar00etherstaff000000 000000 package Devel::REPL::Script; BEGIN { $Devel::REPL::Script::AUTHORITY = 'cpan:PHAYLON'; } { $Devel::REPL::Script::VERSION = '1.003025'; } use Moose; use Devel::REPL; use File::HomeDir; use File::Spec; use Module::Runtime 'use_module'; use namespace::autoclean; our $CURRENT_SCRIPT; with 'MooseX::Getopt'; has 'rcfile' => ( is => 'ro', isa => 'Str', default => sub { 'repl.rc' }, ); has 'profile' => ( is => 'ro', isa => 'Str', default => sub { $ENV{DEVEL_REPL_PROFILE} || 'Minimal' }, ); has '_repl' => ( is => 'ro', isa => 'Devel::REPL', default => sub { Devel::REPL->new() } ); sub BUILD { my ($self) = @_; $self->load_profile($self->profile); $self->load_rcfile($self->rcfile); } sub load_profile { my ($self, $profile) = @_; $profile = "Devel::REPL::Profile::${profile}" unless $profile =~ /::/; use_module $profile; confess "Profile class ${profile} doesn't do 'Devel::REPL::Profile'" unless $profile->does('Devel::REPL::Profile'); $profile->new->apply_profile($self->_repl); } sub load_rcfile { my ($self, $rc_file) = @_; # plain name => ~/.re.pl/${rc_file} if ($rc_file !~ m!/!) { $rc_file = File::Spec->catfile(File::HomeDir->my_home, '.re.pl', $rc_file); } $self->apply_script($rc_file); } sub apply_script { my ($self, $script, $warn_on_unreadable) = @_; if (!-e $script) { warn "File '$script' does not exist" if $warn_on_unreadable; return; } elsif (!-r _) { warn "File '$script' is unreadable" if $warn_on_unreadable; return; } open RCFILE, '<', $script or die "Couldn't open ${script}: $!"; my $rc_data; { local $/; $rc_data = ; } close RCFILE; # Don't care if this fails $self->eval_script($rc_data); warn "Error executing script ${script}: $@\n" if $@; } sub eval_script { my ($self, $data) = @_; local $CURRENT_SCRIPT = $self; $self->_repl->eval($data); } sub run { my ($self) = @_; $self->_repl->run; } sub import { my ($class, @opts) = @_; return unless (@opts == 1 && $opts[0] eq 'run'); $class->new_with_options->run; } sub current { confess "->current should only be called as class method" if ref($_[0]); confess "No current instance (valid only during rc parse)" unless $CURRENT_SCRIPT; return $CURRENT_SCRIPT; } 1; Devel-REPL-1.003025/lib/Devel/REPL/Profile/Default.pm000644 000767 000024 00000000471 12222125630 021705 0ustar00etherstaff000000 000000 package Devel::REPL::Profile::Default; BEGIN { $Devel::REPL::Profile::Default::AUTHORITY = 'cpan:PHAYLON'; } { $Devel::REPL::Profile::Default::VERSION = '1.003025'; } use Moose; use namespace::autoclean; # for backcompat only - Default was renamed to Standard extends 'Devel::REPL::Profile::Standard'; 1; Devel-REPL-1.003025/lib/Devel/REPL/Profile/Minimal.pm000644 000767 000024 00000000635 12222125630 021711 0ustar00etherstaff000000 000000 package Devel::REPL::Profile::Minimal; BEGIN { $Devel::REPL::Profile::Minimal::AUTHORITY = 'cpan:PHAYLON'; } { $Devel::REPL::Profile::Minimal::VERSION = '1.003025'; } use Moose; use namespace::autoclean; with 'Devel::REPL::Profile'; sub plugins { qw(History LexEnv DDS Packages Commands MultiLine::PPI); } sub apply_profile { my ($self, $repl) = @_; $repl->load_plugin($_) for $self->plugins; } 1; Devel-REPL-1.003025/lib/Devel/REPL/Profile/Standard.pm000644 000767 000024 00000001077 12222125630 022064 0ustar00etherstaff000000 000000 package Devel::REPL::Profile::Standard; BEGIN { $Devel::REPL::Profile::Standard::AUTHORITY = 'cpan:PHAYLON'; } { $Devel::REPL::Profile::Standard::VERSION = '1.003025'; } use Moose; use namespace::autoclean; with 'Devel::REPL::Profile'; sub plugins { qw( Colors Completion CompletionDriver::INC CompletionDriver::LexEnv CompletionDriver::Keywords CompletionDriver::Methods History LexEnv DDS Packages Commands MultiLine::PPI ReadLineHistory );} sub apply_profile { my ($self, $repl) = @_; $repl->load_plugin($_) for $self->plugins; } 1; Devel-REPL-1.003025/lib/Devel/REPL/Plugin/B/000755 000767 000024 00000000000 12222125630 020000 5ustar00etherstaff000000 000000 Devel-REPL-1.003025/lib/Devel/REPL/Plugin/Colors.pm000644 000767 000024 00000004507 12222125630 021424 0ustar00etherstaff000000 000000 use strict; use warnings; package Devel::REPL::Plugin::Colors; BEGIN { $Devel::REPL::Plugin::Colors::AUTHORITY = 'cpan:PHAYLON'; } { $Devel::REPL::Plugin::Colors::VERSION = '1.003025'; } use Devel::REPL::Plugin; use Term::ANSIColor; use namespace::autoclean; has normal_color => ( is => 'rw', lazy => 1, default => 'green', ); has error_color => ( is => 'rw', lazy => 1, default => 'bold red', ); around format_error => sub { my $orig = shift; my $self = shift; return color($self->error_color) . $orig->($self, @_) . color('reset'); }; # we can't just munge @_ because that screws up DDS around format_result => sub { my $orig = shift; my $self = shift; no warnings 'uninitialized'; return join "", ( color($self->normal_color), $orig->($self, @_), color('reset'), ); }; # make arbitrary warns colored -- somewhat difficult because warn doesn't # get $self, so we localize $SIG{__WARN__} during eval so it can get # error_color sub _wrap_warn { my $orig = shift; my $self = shift; local $SIG{__WARN__} = sub { my $warning = shift; chomp $warning; warn color($self->error_color || 'bold red') . $warning . color('reset') . "\n"; }; $orig->($self, @_); }; around compile => \&_wrap_warn; around execute => \&_wrap_warn; 1; __END__ =head1 NAME Devel::REPL::Plugin::Colors - add color to return values, warnings, and errors =head1 SYNOPSIS use Devel::REPL; my $repl = Devel::REPL->new; $repl->load_plugin('LexEnv'); $repl->load_plugin('History'); $repl->load_plugin('Colors'); $repl->run; =head1 DESCRIPTION Colors are very pretty. This plugin causes certain prints, warns, and errors to be colored. Generally the return value(s) of each line will be colored green (you can override this by setting C<< $_REPL->normal_color >> in your rcfile). Warnings and compile/runtime errors will be colored with C<< $_REPL->error_color >>. This plugin uses L, so consult that module for valid colors. The defaults are actually 'green' and 'bold red'. =head1 SEE ALSO C =head1 AUTHOR Shawn M Moore, C<< >> =head1 COPYRIGHT AND LICENSE Copyright (C) 2007 by Shawn M Moore This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut Devel-REPL-1.003025/lib/Devel/REPL/Plugin/Commands.pm000644 000767 000024 00000003206 12222125630 021717 0ustar00etherstaff000000 000000 use strict; use warnings; package Devel::REPL::Plugin::Commands; BEGIN { $Devel::REPL::Plugin::Commands::AUTHORITY = 'cpan:PHAYLON'; } { $Devel::REPL::Plugin::Commands::VERSION = '1.003025'; } use Devel::REPL::Plugin; use Scalar::Util qw(weaken); use namespace::autoclean; our $COMMAND_INSTALLER; has 'command_set' => ( is => 'ro', lazy => 1, default => sub { {} } ); sub BEFORE_PLUGIN { my ($self) = @_; $self->load_plugin('Packages'); unless ($self->can('setup_commands')) { $self->meta->add_method('setup_commands' => sub {}); } } sub AFTER_PLUGIN { my ($self) = @_; $self->setup_commands; } after 'setup_commands' => sub { my ($self) = @_; weaken($self); $self->command_set->{load_plugin} = sub { my $self = shift; sub { $self->load_plugin(@_); }; }; }; sub command_installer { my ($self) = @_; my $command_set = $self->command_set; my %command_subs = map { ($_ => $command_set->{$_}->($self)); } keys %$command_set; return sub { my $package = shift; foreach my $command (keys %command_subs) { no strict 'refs'; no warnings 'redefine'; *{"${package}::${command}"} = $command_subs{$command}; } }; } around 'mangle_line' => sub { my ($orig, $self) = (shift, shift); my ($line) = @_; my $name = '$'.__PACKAGE__.'::COMMAND_INSTALLER'; return qq{BEGIN { ${name}->(__PACKAGE__) }\n}.$self->$orig(@_); }; around 'compile' => sub { my ($orig, $self) = (shift, shift); local $COMMAND_INSTALLER = $self->command_installer; $self->$orig(@_); }; 1; __END__ =head1 NAME Devel::REPL::Plugin::Commands - Generic command creation plugin using injected functions =cut Devel-REPL-1.003025/lib/Devel/REPL/Plugin/Completion.pm000644 000767 000024 00000007015 12222125630 022271 0ustar00etherstaff000000 000000 use strict; use warnings; package Devel::REPL::Plugin::Completion; BEGIN { $Devel::REPL::Plugin::Completion::AUTHORITY = 'cpan:PHAYLON'; } { $Devel::REPL::Plugin::Completion::VERSION = '1.003025'; } use Devel::REPL::Plugin; use Scalar::Util 'weaken'; use PPI; use namespace::autoclean; has current_matches => ( is => 'rw', isa => 'ArrayRef', lazy => 1, default => sub { [] }, ); has match_index => ( is => 'rw', isa => 'Int', lazy => 1, default => sub { 0 }, ); has no_term_class_warning => ( isa => "Bool", is => "rw", default => 0, ); has do_readline_filename_completion => ( # so default is no if Completion loaded isa => "Bool", is => "rw", lazy => 1, default => sub { 0 }, ); before 'read' => sub { my ($self) = @_; if ((!$self->term->isa("Term::ReadLine::Gnu") and !$self->term->isa("Term::ReadLine::Perl")) and !$self->no_term_class_warning) { warn "Term::ReadLine::Gnu or Term::ReadLine::Perl is required for the Completion plugin to work"; $self->no_term_class_warning(1); } my $weakself = $self; weaken($weakself); if ($self->term->isa("Term::ReadLine::Gnu")) { $self->term->Attribs->{attempted_completion_function} = sub { $weakself->_completion(@_); }; } if ($self->term->isa("Term::ReadLine::Perl")) { $self->term->Attribs->{completion_function} = sub { $weakself->_completion(@_); }; } }; sub _completion { my $is_trp = scalar(@_) == 4 ? 1 : 0; my ($self, $text, $line, $start, $end) = @_; $end = $start+length($text) if $is_trp; # we're discarding everything after the cursor for completion purposes # we can't just use $text because we want all the code before the cursor to # matter, not just the current word substr($line, $end) = ''; my $document = PPI::Document->new(\$line); return unless defined($document); $document->prune('PPI::Token::Whitespace'); my @matches = $self->complete($text, $document); # iterate through the completions if ($is_trp) { if (scalar(@matches)) { return @matches; } else { return ($self->do_readline_filename_completion) ? readline::rl_filename_list($text) : () ; } } else { $self->term->Attribs->{attempted_completion_over} = 1 unless $self->do_readline_filename_completion; if (scalar(@matches)) { return $self->term->completion_matches($text, sub { my ($text, $state) = @_; if (!$state) { $self->current_matches(\@matches); $self->match_index(0); } else { $self->match_index($self->match_index + 1); } return $self->current_matches->[$self->match_index]; }); } else { return; } } } sub complete { return (); } # recursively find the last element sub last_ppi_element { my ($self, $document, $type) = @_; my $last = $document; while ($last->can('last_element') && defined($last->last_element)) { $last = $last->last_element; return $last if $type && $last->isa($type); } return $last; } 1; __END__ =head1 NAME Devel::REPL::Plugin::Completion - Extensible tab completion =head1 NOTE By default, the Completion plugin explicitly does I use the Gnu readline or Term::ReadLine::Perl fallback filename completion. Set the attribute C to 1 to enable this feature. =head1 AUTHOR Shawn M Moore, C<< >> =cut Devel-REPL-1.003025/lib/Devel/REPL/Plugin/CompletionDriver/000755 000767 000024 00000000000 12222125630 023104 5ustar00etherstaff000000 000000 Devel-REPL-1.003025/lib/Devel/REPL/Plugin/DDC.pm000644 000767 000024 00000001574 12222125630 020556 0ustar00etherstaff000000 000000 use strict; use warnings; package Devel::REPL::Plugin::DDC; BEGIN { $Devel::REPL::Plugin::DDC::AUTHORITY = 'cpan:PHAYLON'; } { $Devel::REPL::Plugin::DDC::VERSION = '1.003025'; } use Devel::REPL::Plugin; use Data::Dumper::Concise (); around 'format_result' => sub { my $orig = shift; my $self = shift; my $to_dump = (@_ > 1) ? [@_] : $_[0]; my $out; if (ref $to_dump) { if (overload::Method($to_dump, '""')) { $out = "$to_dump"; } else { $out = Data::Dumper::Concise::Dumper($to_dump); } } else { $out = $to_dump; } $self->$orig($out); }; 1; __END__ =head1 NAME Devel::REPL::Plugin::DDC - Format results with Data::Dumper::Concise =head1 SYNOPSIS # in your re.pl file: use Devel::REPL; my $repl = Devel::REPL->new; $repl->load_plugin('DDS'); $repl->run; # after you run re.pl: $ map $_*2, ( 1,2,3 ) [ 2, 4, 6 ]; $ =cut Devel-REPL-1.003025/lib/Devel/REPL/Plugin/DDS.pm000644 000767 000024 00000002065 12222125630 020572 0ustar00etherstaff000000 000000 use strict; use warnings; package Devel::REPL::Plugin::DDS; BEGIN { $Devel::REPL::Plugin::DDS::AUTHORITY = 'cpan:PHAYLON'; } { $Devel::REPL::Plugin::DDS::VERSION = '1.003025'; } use Devel::REPL::Plugin; use Data::Dump::Streamer (); around 'format_result' => sub { my $orig = shift; my $self = shift; my @to_dump = @_; my $out; if (@to_dump > 1 || ref $to_dump[0]) { if (@to_dump == 1 && overload::Method($to_dump[0], '""')) { $out = "@to_dump"; } else { my $dds = Data::Dump::Streamer->new; $dds->Freezer(sub { "$_[0]"; }); $dds->Data(@to_dump); $out = $dds->Out; } } else { $out = $to_dump[0]; } $self->$orig($out); }; 1; __END__ =head1 NAME Devel::REPL::Plugin::DDS - Format results with Data::Dump::Streamer =head1 SYNOPSIS # in your re.pl file: use Devel::REPL; my $repl = Devel::REPL->new; $repl->load_plugin('DDS'); $repl->run; # after you run re.pl: $ map $_*2, ( 1,2,3 ) $ARRAY1 = [ 2, 4, 6 ]; $ =cut Devel-REPL-1.003025/lib/Devel/REPL/Plugin/DumpHistory.pm000644 000767 000024 00000003555 12222125630 022454 0ustar00etherstaff000000 000000 use strict; use warnings; package Devel::REPL::Plugin::DumpHistory; BEGIN { $Devel::REPL::Plugin::DumpHistory::AUTHORITY = 'cpan:PHAYLON'; } { $Devel::REPL::Plugin::DumpHistory::VERSION = '1.003025'; } use Devel::REPL::Plugin; use namespace::autoclean; ## Seems to be a sequence issue with requires # requires qw{ history }; around 'read' => sub { my $orig = shift; my ($self, @args) = @_; my $line = $self->$orig(@args); if (defined $line) { if ($line =~ m/^:dump ?(.*)$/) { my $file = $1; $self->print_history($file); return ''; } } return $line; }; sub print_history { my ( $self, $file ) = @_; if ($file) { open( my $fd, ">>", $file ) or do { warn "Couldn't open '$file': $!\n"; return; }; print $fd "$_\n" for ( @{ $self->history } ); $self->print( sprintf "Dumped %d history lines to '$file'\n", scalar @{ $self->history } ); close $fd; } else { $self->print("$_\n") for ( @{ $self->history } ); } return 1; } 1; __END__ =head1 NAME Devel::REPL::Plugin::DumpHistory - Plugin for Devel::REPL to save or print the history. =head1 SYNOPSIS use Devel::REPL; my $repl = Devel::REPL->new; $repl->load_plugin('LexEnv'); $repl->load_plugin('History'); $repl->load_plugin('DumpHistory'); $repl->run; =head1 DESCRIPTION Plugin that adds the C<:dump> and C<:dump file_name> commands to the repl which will print the history to STDOUT or append the history to the file given. =head1 SEE ALSO C =head1 AUTHOR mgrimes, Emgrimes at cpan dot org =head1 COPYRIGHT AND LICENSE Copyright (C) 2007 by mgrimes This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.2 or, at your option, any later version of Perl 5 you may have available. =cut Devel-REPL-1.003025/lib/Devel/REPL/Plugin/FancyPrompt.pm000644 000767 000024 00000006006 12222125630 022421 0ustar00etherstaff000000 000000 use strict; use warnings; package Devel::REPL::Plugin::FancyPrompt; BEGIN { $Devel::REPL::Plugin::FancyPrompt::AUTHORITY = 'cpan:PHAYLON'; } { $Devel::REPL::Plugin::FancyPrompt::VERSION = '1.003025'; } use Devel::REPL::Plugin; use namespace::autoclean; has 'fancy_prompt' => ( is => 'rw', lazy => 1, # yes, this needs to be a double sub default => sub { sub { my $self = shift; sprintf 're.pl(%s):%03d%s> ', $self->can('current_package') ? $self->current_package : 'main', $self->lines_read, $self->can('line_depth') ? ':' . $self->line_depth : ''; } }, ); has 'fancy_continuation_prompt' => ( is => 'rw', lazy => 1, # yes, this needs to be a double sub default => sub { sub { my $self = shift; sprintf 're.pl(%s):%03d:%d* ', $self->can('current_package') ? $self->current_package : 'main', $self->lines_read, $self->line_depth, } }, ); has 'lines_read' => ( is => 'rw', lazy => 1, default => 0, ); around 'prompt' => sub { shift; my $self = shift; if ($self->can('line_depth') && $self->line_depth) { return $self->fancy_continuation_prompt->($self); } else { return $self->fancy_prompt->($self); } }; before 'read' => sub { my $self = shift; $self->lines_read($self->lines_read + 1); }; 1; __END__ =head1 NAME Devel::REPL::Plugin::FancyPrompt - facilitate user-defined prompts =head1 SYNOPSIS use Devel::REPL; my $repl = Devel::REPL->new; $repl->load_plugin('MultiLine::PPI'); # for indent depth $repl->load_plugin('Packages'); # for current package $repl->load_plugin('FancyPrompt'); $repl->run; =head1 DESCRIPTION FancyPrompt helps you write your own prompts. The default fancy prompt resembles C's default prompt. The default C looks like this: re.pl(main):001:0> 2 + 2 4 C is a constant. C
is the current package. The first number is how many lines have been read so far. The second number (only if you have a C plugin) is how deep you are; intuitively, your indent level. This default can be implemented with: $_REPL->fancy_prompt(sub { my $self = shift; sprintf 're.pl(%s):%03d%s> ', $self->can('current_package') ? $self->current_package : 'main', $self->lines_read, $self->can('line_depth') ? ':' . $self->line_depth : ''; }); C is provided by L (which tracks the current package). C is provided by a C plugin (probably C). You may also set a C. The default is very similar to C's default (except C<*> instead of C<< > >>). =head1 SEE ALSO C =head1 AUTHOR Shawn M Moore, C<< >> =head1 COPYRIGHT AND LICENSE Copyright (C) 2007 by Shawn M Moore This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut Devel-REPL-1.003025/lib/Devel/REPL/Plugin/FindVariable.pm000644 000767 000024 00000002377 12222125630 022514 0ustar00etherstaff000000 000000 use strict; use warnings; package Devel::REPL::Plugin::FindVariable; BEGIN { $Devel::REPL::Plugin::FindVariable::AUTHORITY = 'cpan:PHAYLON'; } { $Devel::REPL::Plugin::FindVariable::VERSION = '1.003025'; } use Devel::REPL::Plugin; use namespace::autoclean; sub find_variable { my ($self, $name) = @_; return \$self if $name eq '$_REPL'; # XXX: this code needs to live in LexEnv if ($self->can('lexical_environment')) { return \( $self->lexical_environment->get_context('_')->{$name} ) if exists $self->lexical_environment->get_context('_')->{$name}; } my $sigil = $name =~ s/^([\$\@\%\&\*])// ? $1 : ''; my $default_package = $self->can('current_package') ? $self->current_package : 'main'; my $package = $name =~ s/^(.*)(::|')// ? $1 : $default_package; my $meta = Class::MOP::Class->initialize($package); # Class::MOP::Package::has_package_symbol method *requires* a sigil return unless length($sigil) and $meta->has_package_symbol("$sigil$name"); $meta->get_package_symbol("$sigil$name"); } 1; __END__ =head1 NAME Devel::REPL::Plugin::FindVariable - Finds variables by name =head1 AUTHOR Shawn M Moore, C<< >> =cut Devel-REPL-1.003025/lib/Devel/REPL/Plugin/History.pm000644 000767 000024 00000003623 12222125630 021622 0ustar00etherstaff000000 000000 use strict; use warnings; package Devel::REPL::Plugin::History; BEGIN { $Devel::REPL::Plugin::History::AUTHORITY = 'cpan:PHAYLON'; } { $Devel::REPL::Plugin::History::VERSION = '1.003025'; } use Devel::REPL::Plugin; use namespace::autoclean; has 'history' => ( isa => 'ArrayRef', is => 'rw', lazy => 1, default => sub { [] } ); # lazy so ReadLineHistory Plugin can set this has 'have_readline_history' => ( is => 'rw', lazy => 1, default => sub { 0 } ); sub push_history { my ($self, $line) = @_; # Push history is not needed if we have Term::ReadLine # support. We put the test inside push_history() in case # someone has modified it in their code. if ($self->have_readline_history) { # update history to keep consistent with Term::ReadLine $self->history( [ $self->term->GetHistory ] ); } else { # not used with Term::ReadLine history support push(@{$self->history}, $line); } } around 'read' => sub { my $orig = shift; my ($self, @args) = @_; my $line = $self->$orig(@args); if (defined $line) { if ($line =~ m/^!(.*)$/) { my $call = $1; $line = $self->history_call($call); if (defined $line) { $self->print($line."\n"); } else { return "'Unable to find ${call} in history'"; } } if ($line =~ m/\S/) { $self->push_history($line); } } return $line; }; sub history_call { my ($self, $call) = @_; if ($call =~ m/^(-?\d+)$/) { # handle !1 or !-1 my $idx = $1; $idx-- if ($idx > 0); # !1 gets history element 0 my $line = $self->history->[$idx]; return $line; } my $re = qr/^\Q${call}\E/; foreach my $line (reverse @{$self->history}) { return $line if ($line =~ $re); } return; }; 1; __END__ =head1 NAME Devel::REPL::Plugin::History - Keep track of all input, provide shortcuts !1, !-1 =cut Devel-REPL-1.003025/lib/Devel/REPL/Plugin/Interrupt.pm000644 000767 000024 00000003241 12222125630 022151 0ustar00etherstaff000000 000000 use strict; use warnings; package Devel::REPL::Plugin::Interrupt; BEGIN { $Devel::REPL::Plugin::Interrupt::AUTHORITY = 'cpan:PHAYLON'; } { $Devel::REPL::Plugin::Interrupt::VERSION = '1.003025'; } use Devel::REPL::Plugin; use Sys::SigAction qw(set_sig_handler); use namespace::autoclean; around 'run' => sub { my ($orig, $self) = (shift, shift); local $SIG{INT} = 'IGNORE'; return $self->$orig(@_); }; around 'run_once' => sub { my ($orig, $self) = (shift, shift); # We have to use Sys::SigAction: Perl 5.8+ has safe signal handling by # default, and Term::ReadLine::Gnu restarts the interrupted system calls. # The result is that the signal handler is not fired until you hit Enter. my $sig_action = set_sig_handler INT => sub { die "Interrupted.\n"; }; return $self->$orig(@_); }; around 'read' => sub { my ($orig, $self) = (shift, shift); # here SIGINT is caught and only kills the line being edited while (1) { my $line = eval { $self->$orig(@_) }; return $line unless $@; die unless $@ =~ /^Interrupted\./; # (Term::ReadLine::Gnu kills the line by default, but needs a LF - # maybe I missed something?) print "\n"; } }; 1; __END__ =head1 NAME Devel::REPL::Plugin::Interrupt - traps SIGINT to kill long-running lines =head1 DESCRIPTION By default L exits on SIGINT (usually Ctrl-C). If you load this module, SIGINT will be trapped and used to kill long-running commands (statements) and also to kill the line being edited (like eg. BASH do). (You can still use Ctrl-D to exit.) =head1 AUTHOR Shawn M Moore, C<< >> =cut Devel-REPL-1.003025/lib/Devel/REPL/Plugin/LexEnv.pm000644 000767 000024 00000004301 12222125630 021354 0ustar00etherstaff000000 000000 use strict; use warnings; package Devel::REPL::Plugin::LexEnv; BEGIN { $Devel::REPL::Plugin::LexEnv::AUTHORITY = 'cpan:PHAYLON'; } { $Devel::REPL::Plugin::LexEnv::VERSION = '1.003025'; } use Devel::REPL::Plugin; use namespace::autoclean; use Lexical::Persistence; sub BEFORE_PLUGIN { my $self = shift; $self->load_plugin('FindVariable'); } has 'lexical_environment' => ( isa => 'Lexical::Persistence', is => 'rw', lazy => 1, default => sub { Lexical::Persistence->new } ); has '_hints' => ( isa => "ArrayRef", is => "rw", predicate => '_has_hints', ); around 'mangle_line' => sub { my $orig = shift; my ($self, @rest) = @_; my $line = $self->$orig(@rest); my $lp = $self->lexical_environment; # Collate my declarations for all LP context vars then add ''; # so an empty statement doesn't return anything (with a no warnings # to prevent "Useless use ..." warning) return join('', 'BEGIN { if ( $_REPL->_has_hints ) { ( $^H, %^H ) = @{ $_REPL->_hints } } }', ( map { "my $_;\n" } keys %{$lp->get_context('_')} ), qq{{ no warnings 'void'; ''; }\n}, $line, '; BEGIN { $_REPL->_hints([ $^H, %^H ]) }', ); }; around 'execute' => sub { my $orig = shift; my ($self, $to_exec, @rest) = @_; my $wrapped = $self->lexical_environment->wrap($to_exec); return $self->$orig($wrapped, @rest); }; # this doesn't work! yarg. we now just check $self->can('lexical_environment') # in FindVariable #around 'find_variable' => sub { # my $orig = shift; # my ($self, $name) = @_; # # return \( $self->lexical_environment->get_context('_')->{$name} ) # if exists $self->lexical_environment->get_context('_')->{$name}; # # return $orig->(@_); #}; 1; __END__ =head1 NAME Devel::REPL::Plugin::LexEnv - Provide a lexical environment for the REPL =head1 SYNOPSIS # in your re.pl file: use Devel::REPL; my $repl = Devel::REPL->new; $repl->load_plugin('LexEnv'); $repl->lexical_environment->do(<<'CODEZ'); use FindBin; use lib "$FindBin::Bin/../lib"; use MyApp::Schema; my $s = MyApp::Schema->connect('dbi:Pg:dbname=foo','broseph','elided'); CODEZ $repl->run; # after you run re.pl: $ warn $s->resultset('User')->first->first_name # <-- note that $s works =cut Devel-REPL-1.003025/lib/Devel/REPL/Plugin/MultiLine/000755 000767 000024 00000000000 12222125630 021521 5ustar00etherstaff000000 000000 Devel-REPL-1.003025/lib/Devel/REPL/Plugin/Nopaste.pm000644 000767 000024 00000006324 12222125630 021573 0ustar00etherstaff000000 000000 use strict; use warnings; package Devel::REPL::Plugin::Nopaste; BEGIN { $Devel::REPL::Plugin::Nopaste::AUTHORITY = 'cpan:PHAYLON'; } { $Devel::REPL::Plugin::Nopaste::VERSION = '1.003025'; } use Devel::REPL::Plugin; use Moose::Util::TypeConstraints; use namespace::autoclean; use Scalar::Util qw(blessed); sub BEFORE_PLUGIN { my $self = shift; $self->load_plugin('Turtles'); } has complete_session => ( traits => ['String'], is => 'rw', isa => 'Str', lazy => 1, default => '', handles => { add_to_session => 'append', }, ); has paste_title => ( is => 'rw', isa => 'Str', lazy => 1, default => 'Devel::REPL session', ); has 'nopaste_format' => ( is => 'rw', isa => enum( [qw[ comment_code comment_output ]] ), lazy => 1, default => 'comment_output', ); before eval => sub { my $self = shift; my $line = shift; if ( $self->nopaste_format() eq 'comment_code' ) { # prepend each line with # $line =~ s/^/# /mg; } $self->add_to_session($line . "\n"); }; around eval => sub { my $orig = shift; my $self = shift; my $line = shift; my @ret = $orig->($self, $line, @_); my @ret_as_str = map { if (!defined($_)) { ''; } elsif (blessed($_) && $_->can('stringify')) { $_->stringify(); } else { $_; } } @ret; if ( $self->nopaste_format() eq 'comment_output' ) { # prepend each line with # map { $_ =~ s/^/# /mg } @ret_as_str; } $self->add_to_session(join("\n", @ret_as_str) . "\n\n"); return @ret; }; sub command_nopaste { my $self = shift; require App::Nopaste; return App::Nopaste->nopaste( text => $self->complete_session, desc => $self->paste_title(), lang => "perl", ); } sub command_pastetitle { my ( $self, undef, $title ) = @_; $self->paste_title( $title ); } 1; __END__ =head1 NAME Devel::REPL::Plugin::Nopaste - #nopaste to upload session's input and output =head1 COMMANDS This module provides these commands to your Devel::REPL shell: =head2 #nopaste The C<#nopaste> sends a transcript of your session to a nopaste site. =head2 #pastetitle The C<#pastetitle> command allows you to set the title of the paste on the nopaste site. For example: C<#pastetitle example of some code> defaults to 'Devel::REPL session' =head1 CONFIGURATION =head2 nopaste_format The format sent to the nopaste server can be adjusted with the C option. By default, the output of each perl statement is commented out, and the perl statements themselves are not. This can be reversed by setting the C attribute to C like this in your re.pl file: C<< $_REPL->nopaste_format( 'comment_code' ); >> The default of commenting out the output would be set like this: C<< $_REPL->nopaste_format( 'comment_output' ); >> These options can be set during a Devel::REPL session, but only affect the future parts of the session, not the past parts. =head1 AUTHOR Shawn M Moore, C<< >> =head1 CONTRIBUTORS =over 4 =item Andrew Moore - C<< >> =back =cut Devel-REPL-1.003025/lib/Devel/REPL/Plugin/OutputCache.pm000644 000767 000024 00000006221 12222125630 022402 0ustar00etherstaff000000 000000 use strict; use warnings; package Devel::REPL::Plugin::OutputCache; BEGIN { $Devel::REPL::Plugin::OutputCache::AUTHORITY = 'cpan:PHAYLON'; } { $Devel::REPL::Plugin::OutputCache::VERSION = '1.003025'; } use Devel::REPL::Plugin; use namespace::autoclean; has output_cache => ( is => 'rw', isa => 'ArrayRef', default => sub { [] }, lazy => 1, ); has warned_about_underscore => ( is => 'rw', isa => 'Bool', default => 0, lazy => 1, ); around 'eval' => sub { my $orig = shift; my ($self, $line) = @_; my $has_underscore = *_{CODE}; if ($has_underscore && !$self->warned_about_underscore) { warn "OutputCache: Sub _ already defined."; $self->warned_about_underscore(1); } else { # if _ is removed, then we should warn about it again if it comes back $self->warned_about_underscore(0); } # this needs to be a postfix conditional for 'local' to work local *_ = sub () { $self->output_cache->[-1] } unless $has_underscore; my @ret; if (wantarray) { @ret = $self->$orig($line); } else { $ret[0] = $self->$orig($line); } push @{ $self->output_cache }, @ret > 1 ? \@ret : $ret[0]; return wantarray ? @ret : $ret[0]; }; 1; __END__ =head1 NAME Devel::REPL::Plugin::OutputCache - remember past results, _ is most recent =head1 SYNOPSIS > 21 / 7 3 > _ * _ 9 > sub { die "later" } sub { die "later" } > _->() Runtime error: later =head1 DESCRIPTION Re-using results is very useful when working in a REPL. With C you get C<_>, which holds the past result. The benefit is that you can build up your result instead of having to type it in all at once, or store it in intermediate variables. C also provides C<< $_REPL->output_cache >>, an array reference of all results in this session. Devel::REPL already has a similar plugin, L. There are some key differences though: =over 4 =item Input vs Output C remembers input. C remembers output. =item Munging vs Pure Perl C performs regular expressions on your input. C provides the C<_> sub as a hook to get the most recent result, and C<< $_REPL->output_cache >> for any other results. =item Principle of Least Surprise C will replace exclamation points in any part of the input. This is problematic if you accidentally include one in a string, or in a C expression. C uses a regular (if oddly named) subroutine so Perl does the parsing -- no surprises. =back =head1 CAVEATS The C<_> sub is shared across all packages. This means that if a module is using the C<_> sub, then there is a conflict and you should not use this plugin. For example, L uses the C<_> sub for localization. Jifty is the only known user. =head1 SEE ALSO C, C =head1 AUTHOR Shawn M Moore, C<< >> =head1 COPYRIGHT AND LICENSE Copyright (C) 2007 by Shawn M Moore This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut Devel-REPL-1.003025/lib/Devel/REPL/Plugin/Packages.pm000644 000767 000024 00000003317 12222125630 021677 0ustar00etherstaff000000 000000 use strict; use warnings; package Devel::REPL::Plugin::Packages; BEGIN { $Devel::REPL::Plugin::Packages::AUTHORITY = 'cpan:PHAYLON'; } { $Devel::REPL::Plugin::Packages::VERSION = '1.003025'; } use Devel::REPL::Plugin; use namespace::autoclean; our $PKG_SAVE; has 'current_package' => ( isa => 'Str', is => 'rw', default => 'Devel::REPL::Plugin::Packages::DefaultScratchpad', lazy => 1 ); around 'wrap_as_sub' => sub { my $orig = shift; my ($self, @args) = @_; my $line = $self->$orig(@args); # prepend package def before sub { ... } return q!package !.$self->current_package.qq!;\n${line}!; }; around 'mangle_line' => sub { my $orig = shift; my ($self, @args) = @_; my $line = $self->$orig(@args); # add a BEGIN block to set the package around at the end of the sub # without mangling the return value (we save it off into a global) $line .= ' ; BEGIN { $Devel::REPL::Plugin::Packages::PKG_SAVE = __PACKAGE__; }'; return $line; }; after 'execute' => sub { my ($self) = @_; # if we survived execution successfully, save the new package out the global $self->current_package($PKG_SAVE) if defined $PKG_SAVE; }; around 'eval' => sub { my $orig = shift; my ($self, @args) = @_; # localise the $PKG_SAVE global in case of nested evals local $PKG_SAVE; return $self->$orig(@args); }; package Devel::REPL::Plugin::Packages::DefaultScratchpad; BEGIN { $Devel::REPL::Plugin::Packages::DefaultScratchpad::AUTHORITY = 'cpan:PHAYLON'; } { $Devel::REPL::Plugin::Packages::DefaultScratchpad::VERSION = '1.003025'; } # declare empty scratchpad package for cleanliness 1; __END__ =head1 NAME Devel::REPL::Plugin::Packages - Keep track of which package the user is in =cut Devel-REPL-1.003025/lib/Devel/REPL/Plugin/Peek.pm000644 000767 000024 00000002326 12222125630 021044 0ustar00etherstaff000000 000000 use strict; use warnings; package Devel::REPL::Plugin::Peek; BEGIN { $Devel::REPL::Plugin::Peek::AUTHORITY = 'cpan:PHAYLON'; } { $Devel::REPL::Plugin::Peek::VERSION = '1.003025'; } use Devel::REPL::Plugin; use Devel::Peek qw(Dump); use namespace::autoclean; sub BEFORE_PLUGIN { my $self = shift; $self->load_plugin('Turtles'); } sub expr_command_peek { my ( $self, $eval, $code ) = @_; my @res = $self->eval($code); if ( $self->is_error(@res) ) { return $self->format(@res); } else { # can't override output properly # FIXME do some dup wizardry Dump(@res); return ""; # this is a hack to print nothing after Dump has already printed. PLZ TO FIX KTHX! } } __PACKAGE__ __END__ =pod =head1 NAME Devel::REPL::Plugin::Peek - L plugin for L. =head1 SYNOPSIS repl> #peek "foo" SV = PV(0xb3dba0) at 0xb4abc0 REFCNT = 1 FLAGS = (POK,READONLY,pPOK) PV = 0x12bcf70 "foo"\0 CUR = 3 LEN = 4 =head1 DESCRIPTION This L adds a C command that calls L instead of the normal printing. =head1 SEE ALSO L, L =head1 AUTHOR Yuval Kogman Enothingmuch@woobling.orgE =cut Devel-REPL-1.003025/lib/Devel/REPL/Plugin/PPI.pm000644 000767 000024 00000002640 12222125630 020607 0ustar00etherstaff000000 000000 use strict; use warnings; package Devel::REPL::Plugin::PPI; BEGIN { $Devel::REPL::Plugin::PPI::AUTHORITY = 'cpan:PHAYLON'; } { $Devel::REPL::Plugin::PPI::VERSION = '1.003025'; } use Devel::REPL::Plugin; use PPI; use PPI::Dumper; use namespace::autoclean; sub BEFORE_PLUGIN { my $self = shift; $self->load_plugin('Turtles'); } sub expr_command_ppi { my ( $self, $eval, $code ) = @_; my $document = PPI::Document->new(\$code); my $dumper = PPI::Dumper->new($document); return $dumper->string; } __PACKAGE__ __END__ =pod =head1 NAME Devel::REPL::Plugin::PPI - PPI dumping of Perl code =head1 SYNOPSIS repl> #ppi Devel::REPL PPI::Document PPI::Statement PPI::Token::Word 'Devel::REPL' repl> #ppi { > warn $]; > } PPI::Document PPI::Statement::Compound PPI::Structure::Block { ... } PPI::Token::Whitespace '\n' PPI::Statement PPI::Token::Word 'warn' PPI::Token::Whitespace ' ' PPI::Token::Magic '$]' PPI::Token::Structure ';' PPI::Token::Whitespace '\n' =head1 DESCRIPTION This plugin provides a C command that uses L to dump L-parsed Perl documents. The code is not actually executed, which means that when used with L there is no new value in C<_>. =head1 AUTHOR Shawn M Moore Esartak@gmail.comE =cut Devel-REPL-1.003025/lib/Devel/REPL/Plugin/ReadLineHistory.pm000644 000767 000024 00000007051 12222125630 023225 0ustar00etherstaff000000 000000 # First cut at using the readline history directly rather than reimplementing # it. It does save history but it's a little crappy; still playing with it ;) # # epitaph, 22nd April 2007 use strict; use warnings; package Devel::REPL::Plugin::ReadLineHistory; BEGIN { $Devel::REPL::Plugin::ReadLineHistory::AUTHORITY = 'cpan:PHAYLON'; } { $Devel::REPL::Plugin::ReadLineHistory::VERSION = '1.003025'; } use Devel::REPL::Plugin; use File::HomeDir; use File::Spec; my $hist_file = $ENV{PERLREPL_HISTFILE} || File::Spec->catfile(File::HomeDir->my_home, '.perlreplhist'); # HISTLEN should probably be in a config file to stop people accidentally # truncating their history if they start the program and forget to set # PERLREPL_HISTLEN my $hist_len=$ENV{PERLREPL_HISTLEN} || 100; around 'run' => sub { my $orig=shift; my ($self, @args)=@_; if ($self->term->ReadLine eq 'Term::ReadLine::Gnu') { $self->term->stifle_history($hist_len); } if ($self->term->ReadLine eq 'Term::ReadLine::Perl') { $self->term->Attribs->{MaxHistorySize} = $hist_len; } if (-f($hist_file)) { if ($self->term->ReadLine eq 'Term::ReadLine::Gnu') { $self->term->ReadHistory($hist_file); } if ($self->term->ReadLine eq 'Term::ReadLine::Perl') { open HIST, $hist_file or die "ReadLineHistory: could not open $hist_file: $!\n"; while (my $line = ) { chomp $line; $self->term->addhistory($line); } close HIST; } } $self->term->Attribs->{do_expand}=1; # for Term::ReadLine::Gnu $self->term->MinLine(2); # don't save one letter commands # let History plugin know we have Term::ReadLine support $self->have_readline_history(1) if $self->can('have_readline_history'); $self->$orig(@args); if ($self->term->ReadLine eq 'Term::ReadLine::Gnu') { $self->term->WriteHistory($hist_file) || $self->print("warning: failed to write history file $hist_file"); } if ($self->term->ReadLine eq 'Term::ReadLine::Perl') { my @lines = $self->term->GetHistory() if $self->term->can('GetHistory'); if( open HIST, ">$hist_file" ) { print HIST join("\n",@lines); close HIST; } else { $self->print("warning: unable to WriteHistory to $hist_file"); } } }; 1; __END__ =head1 NAME Devel::REPL::Plugin::ReadLineHistory - Integrate history with the facilities provided by L =head1 DESCRIPTION This plugin enables loading and saving command line history from a file as well has history expansion of previous commands using the !-syntax a la bash. By default, history expansion is enabled with this plugin when using L. That means that "loose" '!' characters will be treated as history events which may not be what you wish. To avoid this, you need to quote the '!' with '\': my $var = "foo\!"; or place the arguments in single quotes---but enable the C attribute C: $_REPL->term->Attribs->{history_quotes_inhibit_expansion} = 1; my $var = 'foo!'; and to disable history expansion from GNU readline/history do $_REPL->term->Attribs->{do_expand} = 0; =head1 CONFLICTS Note that Term::ReadLine::Perl does not support a history expansion method. In that case, you may wish to use the Devel::REPL History plugin which provides similar functions. Work is underway to make use of either History or ReadLineHistory consistent for expansion with either the Term::ReadLine::Gnu support or Term::ReadLine::Perl. =cut Devel-REPL-1.003025/lib/Devel/REPL/Plugin/Refresh.pm000644 000767 000024 00000001234 12222125630 021553 0ustar00etherstaff000000 000000 use strict; use warnings; package Devel::REPL::Plugin::Refresh; BEGIN { $Devel::REPL::Plugin::Refresh::AUTHORITY = 'cpan:PHAYLON'; } { $Devel::REPL::Plugin::Refresh::VERSION = '1.003025'; } use Devel::REPL::Plugin; use namespace::autoclean; use Module::Refresh; # before evaluating the code, ask Module::Refresh to refresh # the modules that have changed around 'eval' => sub { my $orig = shift; my ($self, $line) = @_; # first refresh the changed modules Module::Refresh->refresh; # the eval the code return $self->$orig($line); }; 1; __END__ =head1 NAME Devel::REPL::Plugin::Refresh - reload libraries with Module::Refresh =cut Devel-REPL-1.003025/lib/Devel/REPL/Plugin/ShowClass.pm000644 000767 000024 00000005134 12222125630 022066 0ustar00etherstaff000000 000000 use strict; use warnings; package Devel::REPL::Plugin::ShowClass; BEGIN { $Devel::REPL::Plugin::ShowClass::AUTHORITY = 'cpan:PHAYLON'; } { $Devel::REPL::Plugin::ShowClass::VERSION = '1.003025'; } use Devel::REPL::Plugin; use namespace::autoclean; has 'metaclass_cache' => ( is => 'ro', isa => 'HashRef', lazy => 1, default => sub {{}} ); before 'eval' => sub { my $self = shift; $self->update_metaclass_cache; }; after 'eval' => sub { my $self = shift; my @metas_to_show; foreach my $class (Class::MOP::get_all_metaclass_names()) { unless (exists $self->metaclass_cache->{$class}) { push @metas_to_show => Class::MOP::get_metaclass_by_name($class) } } $self->display_class($_) foreach @metas_to_show; $self->update_metaclass_cache; }; sub update_metaclass_cache { my $self = shift; foreach my $class (Class::MOP::get_all_metaclass_names()) { $self->metaclass_cache->{$class} = ( ("" . Class::MOP::get_metaclass_by_name($class)) ); } } sub display_class { my ($self, $meta) = @_; $self->print('package ' . $meta->name . ";\n\n"); $self->print('extends (' . (join ", " => $meta->superclasses) . ");\n\n") if $meta->superclasses; $self->print('with (' . (join ", " => map { $_->name } @{$meta->roles}) . ");\n\n") if $meta->can('roles'); foreach my $attr (map { $meta->get_attribute($_) } $meta->get_attribute_list) { $self->print('has ' . $attr->name . " => (\n"); $self->print(' is => ' . $attr->_is_metadata . ",\n") if $attr->_is_metadata; $self->print(' isa => ' . $attr->_isa_metadata . ",\n") if $attr->_isa_metadata; $self->print(' required => ' . $attr->is_required . ",\n") if $attr->is_required; $self->print(' lazy => ' . $attr->is_lazy . ",\n") if $attr->is_lazy; $self->print(' coerce => ' . $attr->should_coerce . ",\n") if $attr->should_coerce; $self->print(' is_weak_ref => ' . $attr->is_weak_ref . ",\n") if $attr->is_weak_ref; $self->print(' auto_deref => ' . $attr->should_auto_deref . ",\n") if $attr->should_auto_deref; $self->print(");\n"); $self->print("\n"); } foreach my $method_name ($meta->get_method_list) { next if $method_name eq 'meta' || $meta->get_method($method_name)->isa('Class::MOP::Method::Accessor'); $self->print("sub $method_name { ... }\n"); $self->print("\n"); } $self->print("1;\n"); } 1; __END__ =head1 NAME Devel::REPL::Plugin::ShowClass - Dump classes initialized with Class::MOP =cut Devel-REPL-1.003025/lib/Devel/REPL/Plugin/Timing.pm000644 000767 000024 00000001676 12222125630 021416 0ustar00etherstaff000000 000000 use strict; use warnings; package Devel::REPL::Plugin::Timing; BEGIN { $Devel::REPL::Plugin::Timing::AUTHORITY = 'cpan:PHAYLON'; } { $Devel::REPL::Plugin::Timing::VERSION = '1.003025'; } use Devel::REPL::Plugin; use Time::HiRes 'time'; use namespace::autoclean; around 'eval' => sub { my $orig = shift; my ($self, $line) = @_; my @ret; my $start = time; if (wantarray) { @ret = $self->$orig($line); } else { $ret[0] = $self->$orig($line); } $self->print("Took " . (time - $start) . " seconds.\n"); return @ret; }; 1; __END__ =head1 NAME Devel::REPL::Plugin::Timing - display execution times =head1 SYNOPSIS # in your re.pl file: use Devel::REPL; my $repl = Devel::REPL->new; $repl->load_plugin('Timing'); # after you run re.pl: $ sum map $_*100, 1..100000; Took 0.0830280780792236 seconds. 500005000000 $ =head1 AUTHOR Shawn M Moore, C<< >> =cut Devel-REPL-1.003025/lib/Devel/REPL/Plugin/Turtles.pm000644 000767 000024 00000004534 12222125630 021625 0ustar00etherstaff000000 000000 use strict; use warnings; package Devel::REPL::Plugin::Turtles; BEGIN { $Devel::REPL::Plugin::Turtles::AUTHORITY = 'cpan:PHAYLON'; } { $Devel::REPL::Plugin::Turtles::VERSION = '1.003025'; } use Devel::REPL::Plugin; use Scalar::Util qw(reftype); use namespace::autoclean; has default_command_prefix => ( isa => "RegexpRef", is => "rw", default => sub { qr/\#/ }, ); has turtles_matchers => ( traits => ['Array'], isa => "ArrayRef[RegexpRef|CodeRef]", is => "rw", lazy => 1, default => sub { my $prefix = shift->default_command_prefix; [qr/^ $prefix (\w+) \s* (.*) /x] }, handles => { add_turtles_matcher => 'unshift', }, ); around 'formatted_eval' => sub { my $next = shift; my ($self, $line, @args) = @_; if ( my ( $command, @rest ) = $self->match_turtles($line) ) { my $method = "command_$command"; my $expr_method = "expr_$method"; if ( my $expr_code = $self->can($expr_method) ) { if ( my $read_more = $self->can("continue_reading_if_necessary") ) { push @rest, $self->$read_more(pop @rest); } $self->$expr_code($next, @rest); } elsif ( my $cmd_code = $self->can($method) ) { return $self->$cmd_code($next, @rest); } else { unless ( $line =~ /^\s*#/ ) { # special case for comments return $self->format($self->error_return("REPL Error", "Command '$command' does not exist")); } } } else { return $self->$next($line, @args); } }; sub match_turtles { my ( $self, $line ) = @_; foreach my $thingy ( @{ $self->turtles_matchers } ) { if ( reftype $thingy eq 'CODE' ) { if ( my @res = $self->$thingy($line) ) { return @res; } } else { if ( my @res = ( $line =~ $thingy ) ) { return @res; } } } return; } 1; __END__ =head1 NAME Devel::REPL::Plugin::Turtles - Generic command creation using a read hook =head1 DESCRIPTION By default, this plugin allows calling commands using a read hook to detect a default_command_prefix followed by the command name, say MYCMD as an example. The actual routine to call for the command is constructed by looking for subs named 'command_MYCMD' or 'expr_MYCMD' and executing them. =head2 NOTE The C is C so care must be taken if other uses for that character are needed (e.g., '#' for the shell escape character in the PDL shell. =cut Devel-REPL-1.003025/lib/Devel/REPL/Plugin/MultiLine/PPI.pm000644 000767 000024 00000006303 12222125630 022511 0ustar00etherstaff000000 000000 use strict; use warnings; package Devel::REPL::Plugin::MultiLine::PPI; BEGIN { $Devel::REPL::Plugin::MultiLine::PPI::AUTHORITY = 'cpan:PHAYLON'; } { $Devel::REPL::Plugin::MultiLine::PPI::VERSION = '1.003025'; } use Devel::REPL::Plugin; use PPI; use namespace::autoclean; has 'continuation_prompt' => ( is => 'rw', lazy => 1, default => sub { '> ' } ); has 'line_depth' => ( is => 'rw', lazy => 1, default => sub { 0 } ); around 'read' => sub { my $orig = shift; my ($self, @args) = @_; my $line = $self->$orig(@args); if (defined $line) { return $self->continue_reading_if_necessary($line, @args); } else { return $line; } }; sub continue_reading_if_necessary { my ( $self, $line, @args ) = @_; while ($self->line_needs_continuation($line)) { my $orig_prompt = $self->prompt; $self->prompt($self->continuation_prompt); $self->line_depth($self->line_depth + 1); my $append = $self->read(@args); $self->line_depth($self->line_depth - 1); $line .= "\n$append" if defined($append); $self->prompt($orig_prompt); # ^D means "shut up and eval already" return $line if !defined($append); } return $line; } sub line_needs_continuation { my $repl = shift; my $line = shift; # add this so we can test whether the document ends in PPI::Statement::Null $line .= "\n;;"; my $document = PPI::Document->new(\$line); return 0 if !defined($document); # adding ";" to a complete document adds a PPI::Statement::Null. we added a ;; # so if it doesn't end in null then there's probably something that's # incomplete return 0 if $document->child(-1)->isa('PPI::Statement::Null'); # this could use more logic, such as returning 1 on s/foo/ba my $unfinished_structure = sub { my ($document, $element) = @_; return 0 unless $element->isa('PPI::Structure'); return 1 unless $element->finish; return 0; }; return $document->find_any($unfinished_structure); } 1; __END__ =head1 NAME Devel::REPL::Plugin::MultiLine::PPI - read lines until all blocks are closed =head1 SYNOPSIS use Devel::REPL; my $repl = Devel::REPL->new; $repl->load_plugin('LexEnv'); $repl->load_plugin('History'); $repl->load_plugin('MultiLine::PPI'); $repl->run; =head1 DESCRIPTION Plugin that will collect lines until you have no unfinished structures. This lets you write subroutines, C statements, loops, etc. more naturally. For example, without a MultiLine plugin, $ my $x = 3; 3 $ if ($x == 3) { will throw a compile error, because that C statement is incomplete. With a MultiLine plugin, $ my $x = 3; 3 $ if ($x == 3) { > print "OH NOES!" > } OH NOES 1 you may write the code across multiple lines, such as in C and C. This module uses L. This plugin is named C because someone else may conceivably implement similar behavior some other less dependency-heavy way. =head1 SEE ALSO C =head1 AUTHOR Shawn M Moore, C<< >> =head1 COPYRIGHT AND LICENSE Copyright (C) 2007 by Shawn M Moore This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut Devel-REPL-1.003025/lib/Devel/REPL/Plugin/CompletionDriver/Globals.pm000644 000767 000024 00000003753 12222125630 025035 0ustar00etherstaff000000 000000 use strict; use warnings; package Devel::REPL::Plugin::CompletionDriver::Globals; BEGIN { $Devel::REPL::Plugin::CompletionDriver::Globals::AUTHORITY = 'cpan:PHAYLON'; } { $Devel::REPL::Plugin::CompletionDriver::Globals::VERSION = '1.003025'; } use Devel::REPL::Plugin; use Devel::REPL::Plugin::Completion; # die early if cannot load use namespace::autoclean; sub BEFORE_PLUGIN { my $self = shift; $self->load_plugin('Completion'); } around complete => sub { my $orig = shift; my ($self, $text, $document) = @_; my $last = $self->last_ppi_element($document); return $orig->(@_) unless $last->isa('PPI::Token::Symbol') || $last->isa('PPI::Token::Word'); my $sigil = $last =~ s/^[\$\@\%\&\*]// ? $1 : undef; my $re = qr/^\Q$last/; my @package_fragments = split qr/::|'/, $last; # split drops the last fragment if it's empty push @package_fragments, '' if $last =~ /(?:'|::)$/; # the beginning of the variable, or an incomplete package name my $incomplete = pop @package_fragments; # recurse for the complete package fragments my $stash = \%::; for (@package_fragments) { $stash = $stash->{"$_\::"}; } # collect any variables from this stash my @found = grep { /$re/ } map { join '::', @package_fragments, $_ } keys %$stash; # check to see if it's an incomplete package name, and add its variables # so Devel is completed correctly for my $key (keys %$stash) { next unless $key =~ /::$/; # only look at deeper packages next unless $key =~ /^\Q$incomplete/; # only look at matching packages push @found, map { join '::', @package_fragments, $_ } map { "$key$_" } # $key already has trailing :: keys %{ $stash->{$key} }; } return $orig->(@_), @found; }; 1; __END__ =head1 NAME Devel::REPL::Plugin::CompletionDriver::Globals - Complete global variables, packages, namespaced functions =head1 AUTHOR Shawn M Moore, C<< >> =cut Devel-REPL-1.003025/lib/Devel/REPL/Plugin/CompletionDriver/INC.pm000644 000767 000024 00000007045 12222125630 024061 0ustar00etherstaff000000 000000 use strict; use warnings; package Devel::REPL::Plugin::CompletionDriver::INC; BEGIN { $Devel::REPL::Plugin::CompletionDriver::INC::AUTHORITY = 'cpan:PHAYLON'; } { $Devel::REPL::Plugin::CompletionDriver::INC::VERSION = '1.003025'; } use Devel::REPL::Plugin; use Devel::REPL::Plugin::Completion; # die early if cannot load use File::Next; use File::Spec; use namespace::autoclean; sub BEFORE_PLUGIN { my $self = shift; $self->load_plugin('Completion'); } around complete => sub { my $orig = shift; my ($self, $text, $document) = @_; my $last = $self->last_ppi_element($document, 'PPI::Statement::Include'); return $orig->(@_) unless $last->isa('PPI::Statement::Include'); my @elements = $last->children; shift @elements; # use or require # too late for us to care, they're completing on something like # use List::Util qw(m # OR they just have "use " and are tab completing. we'll spare them the flood return $orig->(@_) if @elements != 1; my $package = shift @elements; my $outsep = '::'; my $insep = "::"; my $keep_extension = 0; my $prefix = ''; # require "Foo/Bar.pm" -- not supported yet, ->string doesn't work for # partially completed elements #if ($package->isa('PPI::Token::Quote')) #{ # # we need to strip off the leading quote and stash it # $package = $package->string; # my $start = index($package->quote, $package); # $prefix = substr($package->quote, 0, $start); # # we're completing something like: require "Foo/Bar.pm" # $outsep = $insep = '/'; # $keep_extension = 1; #} if ($package =~ /'/) { # the goofball is using the ancient ' package sep, we'll humor him $outsep = "'"; $insep = "'|::"; } my @directories = split $insep, $package; # split drops trailing fields push @directories, '' if $package =~ /(?:$insep)$/; my $final = pop @directories; my $final_re = qr/^\Q$final/; my @found; # most VCSes don't litter every single fucking directory with garbage. if you # know of any other, just stick them in here. No one wants to complete # Devel::REPL::Plugin::.svn my %ignored = ( '.' => 1, '..' => 1, '.svn' => 1, ); # this will take a directory and add to @found all of the possible matches my $add_recursively; $add_recursively = sub { my ($path, $iteration, @more) = @_; opendir((my $dirhandle), $path) || return; for (grep { !$ignored{$_} } readdir $dirhandle) { my $match = $_; # if this is the first time around, we need respect whatever the user had # at the very end when he pressed tab next if $iteration == 0 && $match !~ $final_re; my $fullmatch = File::Spec->rel2abs($match, $path); if (-d $fullmatch) { $add_recursively->($fullmatch, $iteration + 1, @more, $match); } else { $match =~ s/\..*// unless $keep_extension; push @found, join '', $prefix, join $outsep, @directories, @more, $match; } } }; # look through all of INC: for (@INC) { my $path = $_; # match all of the fragments they have, so "use Moose::Meta::At" # will only begin looking in ../Moose/Meta/ for my $subdir (@directories) { $path = File::Spec->catdir($path, $subdir); -d $path or next INC; } $add_recursively->($path, 0); } return $orig->(@_), @found; }; 1; __END__ =head1 NAME Devel::REPL::Plugin::CompletionDriver::INC - Complete module names in use and require =head1 AUTHOR Shawn M Moore, C<< >> =cut Devel-REPL-1.003025/lib/Devel/REPL/Plugin/CompletionDriver/Keywords.pm000644 000767 000024 00000002246 12222125630 025255 0ustar00etherstaff000000 000000 use strict; use warnings; package Devel::REPL::Plugin::CompletionDriver::Keywords; BEGIN { $Devel::REPL::Plugin::CompletionDriver::Keywords::AUTHORITY = 'cpan:PHAYLON'; } { $Devel::REPL::Plugin::CompletionDriver::Keywords::VERSION = '1.003025'; } use Devel::REPL::Plugin; use Devel::REPL::Plugin::Completion; # die early if cannot load use B::Keywords qw/@Functions @Barewords/; use namespace::autoclean; sub BEFORE_PLUGIN { my $self = shift; $self->load_plugin('Completion'); } around complete => sub { my $orig = shift; my ($self, $text, $document) = @_; my $last = $self->last_ppi_element($document); return $orig->(@_) unless $last->isa('PPI::Token::Word'); # don't complete keywords on foo->method return $orig->(@_) if $last->sprevious_sibling && $last->sprevious_sibling->isa('PPI::Token::Operator') && $last->sprevious_sibling->content eq '->'; my $re = qr/^\Q$last/; return $orig->(@_), grep { $_ =~ $re } @Functions, @Barewords; }; 1; __END__ =head1 NAME Devel::REPL::Plugin::CompletionDriver::Keywords - Complete Perl keywords and operators =head1 AUTHOR Shawn M Moore, C<< >> =cut Devel-REPL-1.003025/lib/Devel/REPL/Plugin/CompletionDriver/LexEnv.pm000644 000767 000024 00000002246 12222125630 024647 0ustar00etherstaff000000 000000 use strict; use warnings; package Devel::REPL::Plugin::CompletionDriver::LexEnv; BEGIN { $Devel::REPL::Plugin::CompletionDriver::LexEnv::AUTHORITY = 'cpan:PHAYLON'; } { $Devel::REPL::Plugin::CompletionDriver::LexEnv::VERSION = '1.003025'; } use Devel::REPL::Plugin; use Devel::REPL::Plugin::Completion; # die early if cannot load use namespace::autoclean; sub BEFORE_PLUGIN { my $self = shift; $self->load_plugin('Completion'); } around complete => sub { my $orig = shift; my ($self, $text, $document) = @_; my $last = $self->last_ppi_element($document); return $orig->(@_) unless $last->isa('PPI::Token::Symbol'); my ($sigil, $name) = split(//, $last, 2); my $re = qr/^\Q$name/; return $orig->(@_), # ReadLine is weirdly inconsistent map { $sigil eq '%' ? '%' . $_ : $_ } grep { /$re/ } map { substr($_, 1) } # drop lexical's sigil '$_REPL', keys %{$self->lexical_environment->get_context('_')}; }; 1; __END__ =head1 NAME Devel::REPL::Plugin::CompletionDriver::LexEnv - Complete variable names in the REPL's lexical environment =head1 AUTHOR Shawn M Moore, C<< >> =cut Devel-REPL-1.003025/lib/Devel/REPL/Plugin/CompletionDriver/Methods.pm000644 000767 000024 00000004047 12222125630 025052 0ustar00etherstaff000000 000000 use strict; use warnings; package Devel::REPL::Plugin::CompletionDriver::Methods; BEGIN { $Devel::REPL::Plugin::CompletionDriver::Methods::AUTHORITY = 'cpan:PHAYLON'; } { $Devel::REPL::Plugin::CompletionDriver::Methods::VERSION = '1.003025'; } use Devel::REPL::Plugin; use Devel::REPL::Plugin::Completion; # die early if cannot load use namespace::autoclean; sub BEFORE_PLUGIN { my $self = shift; for (qw/Completion FindVariable/) { $self->load_plugin($_); } } around complete => sub { my $orig = shift; my ($self, $text, $document) = @_; my $last = $self->last_ppi_element($document); my $incomplete = ''; # handle an incomplete method name, and back up to the -> if ($last->isa('PPI::Token::Word')) { my $previous = $last->sprevious_sibling or return $orig->(@_); $previous->isa('PPI::Token::Operator') && $previous->content eq '->' or return $orig->(@_); $incomplete = $last->content; $last = $previous; } # require a -> here return $orig->(@_) unless $last->isa('PPI::Token::Operator') && $last->content eq '->'; # ..which is preceded by a word (class name) my $previous = $last->sprevious_sibling or return $orig->(@_); $previous->isa('PPI::Token::Word') || $previous->isa('PPI::Token::Symbol') or return $orig->(@_); my $class; # we have a variable, need to look up its class if ($previous->isa('PPI::Token::Symbol')) { my $object_ref = $self->find_variable($previous->content) or return $orig->(@_); $class = blessed($$object_ref) or return $orig->(@_); } else { $class = $previous->content; } # now we have $class->$incomplete my $metaclass = Class::MOP::Class->initialize($class); my $re = qr/^\Q$incomplete/; return $orig->(@_), grep { $_ =~ $re } map { $_->name } $metaclass->get_all_methods; }; 1; __END__ =head1 NAME Devel::REPL::Plugin::CompletionDriver::Methods - Complete class or object method names =head1 AUTHOR Shawn M Moore, C<< >> =cut Devel-REPL-1.003025/lib/Devel/REPL/Plugin/CompletionDriver/Turtles.pm000644 000767 000024 00000002251 12222125630 025104 0ustar00etherstaff000000 000000 use strict; use warnings; package Devel::REPL::Plugin::CompletionDriver::Turtles; BEGIN { $Devel::REPL::Plugin::CompletionDriver::Turtles::AUTHORITY = 'cpan:PHAYLON'; } { $Devel::REPL::Plugin::CompletionDriver::Turtles::VERSION = '1.003025'; } use Devel::REPL::Plugin; use Devel::REPL::Plugin::Completion; # die early if cannot load use namespace::autoclean; sub BEFORE_PLUGIN { my $self = shift; $self->load_plugin('Completion'); } around complete => sub { my $orig = shift; my ($self, $text, $document) = @_; my $prefix = $self->default_command_prefix; my $line_re = qr/^($prefix)(\w+)/; my @orig = $self->$orig($text, $document); if ( my ( $pre, $method ) = ( $text =~ $line_re ) ) { my $filter = qr/^\Q$method/; return ( @orig, ( map { "$pre$_" } grep { $_ =~ $filter } map { /^expr?_command_(\w+)/ ? $1 : () } map { $_->name } $self->meta->get_all_methods ), ); } else { return @orig; } }; __PACKAGE__ __END__ =head1 NAME Devel::REPL::Plugin::CompletionDriver::Turtles - Complete Turtles-based commands =head1 AUTHOR Yuval Kogman Enothingmuch@woobling.orgE =cut Devel-REPL-1.003025/lib/Devel/REPL/Plugin/B/Concise.pm000644 000767 000024 00000004007 12222125630 021722 0ustar00etherstaff000000 000000 use strict; use warnings; package Devel::REPL::Plugin::B::Concise; BEGIN { $Devel::REPL::Plugin::B::Concise::AUTHORITY = 'cpan:PHAYLON'; } { $Devel::REPL::Plugin::B::Concise::VERSION = '1.003025'; } use Devel::REPL::Plugin; use B::Concise (); B::Concise::compileOpts(qw(-nobanner)); use namespace::autoclean; sub BEFORE_PLUGIN { my $self = shift; $self->load_plugin('Turtles'); } sub AFTER_PLUGIN { my $self = shift; my $prefix = $self->default_command_prefix; $self->add_turtles_matcher(qr/^ \#(concise) \s+ ( (?:\-\w+\s+)* ) # options for concise (.*) # the code /x); } sub expr_command_concise { my ( $self, $eval, $opts, $code ) = @_; die unless $code; my %opts = map { $_ => 1 } (split /\s+/, $opts); my $sub = $self->compile($code, no_mangling => !delete($opts{"-mangle"}) ); if ( $self->is_error($sub) ) { return $self->format($sub); } else { open my $fh, ">", \my $out; { local *STDOUT = $fh; B::Concise::compile(keys %opts, $sub)->(); } return $out; } } __PACKAGE__ __END__ =pod =head1 NAME Devel::REPL::Plugin::B::Concise - B::Concise dumping of expression optrees =head1 SYNOPSIS repl> #concise -exec -terse { > foo => foo(), > } COP (0x138b1e0) nextstate OP (0x13bd280) pushmark SVOP (0x138c6a0) const PV (0xbbab50) "foo" OP (0x13bbae0) pushmark SVOP (0x13bcee0) gv GV (0xbbb250) *Devel::REPL::Plugin::B::Concise::foo UNOP (0x13890a0) entersub [1] LISTOP (0x13ba020) anonhash UNOP (0x5983d0) leavesub [1] =head1 DESCRIPTION This plugin provides a C command that uses L to dump optrees of expressions. The code is not actually executed, which means that when used with L there is no new value in C<_>. The command takes the same options as L, e.g. C<-basic> or C<-exec> to determine the dump order, C<-debug>, C<-concise> and C<-terse> to determine the formatting, etc. =head1 AUTHOR Yuval Kogman Enothingmuch@woobling.orgE =cut Devel-REPL-1.003025/lib/Devel/REPL/Meta/Plugin.pm000644 000767 000024 00000001141 12222125630 021040 0ustar00etherstaff000000 000000 use strict; use warnings; package Devel::REPL::Meta::Plugin; BEGIN { $Devel::REPL::Meta::Plugin::AUTHORITY = 'cpan:PHAYLON'; } { $Devel::REPL::Meta::Plugin::VERSION = '1.003025'; } use Moose; extends 'Moose::Meta::Role'; before 'apply' => sub { my ($self, $other) = @_; return unless $other->isa('Devel::REPL'); if (my $pre = $self->get_method('BEFORE_PLUGIN')) { $pre->body->($other, $self); } }; after 'apply' => sub { my ($self, $other) = @_; return unless $other->isa('Devel::REPL'); if (my $pre = $self->get_method('AFTER_PLUGIN')) { $pre->body->($other, $self); } }; 1; Devel-REPL-1.003025/examples/dbic_project_profile.pl000644 000767 000024 00000001455 12222125630 022341 0ustar00etherstaff000000 000000 # this might live in /path/to/checkout/.re.pl/project.rc # see: http://chainsawblues.vox.com/library/post/develrepl-part-4---script-options-rc-files-profiles-and-packaging.html # load my global ~/.re.pl/repl.rc Devel::REPL::Script->current->load_rcfile('repl.rc'); use lib 'lib'; # to get at the lib/Project.pm, lib/Project/* perl modules use Project::Schema; # load the DBIC schema Project::Schema->connection('dbi:Pg:dbname=project_matthewt_test','matthewt',''); # connect to db Project::Schema->stacktrace(1); # turn on stack traces for DBI errors sub schema { 'Project::Schema' } # shortcut so things like schema->sources works sub rs { Project::Schema->resultset(shift); } # shortcut so rs('Foo')->find(1); works sub cols { Project::Schema->source(shift)->columns; } # cols('Foo') returns a column list