at000755001750001750 014752333647 14165 5ustar00shlomifshlomif000000000000Clipboard-0.32run100755001750001750 74414752333647 15044 0ustar00shlomifshlomif000000000000Clipboard-0.32/at#!/usr/bin/perl # Basic acceptance test. I didn't want to put anything that messes with the # real clipboard into t/ in case it ends up inadvertently messing up someones # selection, somehow. use strict; use warnings; use lib 'lib'; use Clipboard; my $save = Clipboard->paste; print "Original: ", Clipboard->paste, "\n"; Clipboard->copy('looks like Clipboard->copy works'); print " Now: ", Clipboard->paste, "\n"; Clipboard->copy($save); print "(Restored original clipboard)\n" all100755001750001750 31214752333647 14777 0ustar00shlomifshlomif000000000000Clipboard-0.32/at#!/bin/sh -v for n in \ at/run \ at/pxclip \ at/all-xclip-selections \ at/clipfilter-test \ at/clipjoin-test \ at/clipbrowse-test \ ; do echo -n "Run $n? "; read X; $n; done Clipboard-0.32000755001750001750 014752333647 13640 5ustar00shlomifshlomif000000000000Changes100644001750001750 1210014752333647 15226 0ustar00shlomifshlomif000000000000Clipboard-0.320.32 2025-02-10 - In drivers.t: prefer to use Clipboard::WaylandClipboard . - https://github.com/shlomif/Clipboard/issues/13 - Thanks to @hightowe 0.31 2025-01-21 - Make problematic t/drivers.t tests author only. - https://github.com/shlomif/Clipboard/pull/16 - Thanks to @trwyant 0.30 2024-06-16 - Add Wayland detection and support - https://github.com/shlomif/Clipboard/issues/13 - https://github.com/shlomif/Clipboard/pull/14 - Thanks to @hightowe 0.29 2024-04-07 - Add Xsel.pm / xsel support. - Improve clipbrowse's reliability / security: - https://github.com/shlomif/Clipboard/issues/11 - https://github.com/shlomif/Clipboard/pull/12 - Thanks to @fschlich . - Made the code more elegant and reliable. - E.g.: explicit returns 0.28 2021-02-23 - Hopefully fix prereqs on cygwin. - https://github.com/shlomif/Clipboard/issues/7 - Thanks to @tzccinct . 0.27 2021-02-13 - README.md instead of README and INSTALL - https://github.com/shlomif/Clipboard/issues/5 - Thanks to https://github.com/mitchblank . 0.26 2020-05-16 - Try to fix 'Wide character in print' warning with Xclip - https://github.com/shlomif/Clipboard/issues/4 - Thanks to @shawnhcorey . 0.25 2020-05-14 - Fix capitalization in GitHub links (the links still worked) in META.* - A minor and cosmetic change 0.24 2020-03-07 - Remove Makefile.PL due to ::OSPrereqs not munging it along with Build.PL - https://github.com/dagolden/Dist-Zilla-Plugin-OSPrereqs/issues/4 - Fix macOS detection. - https://github.com/shlomif/Clipboard/issues/1 - convert "darwin" to a regex. 0.23 2020-03-06 - Require deps on MacOS and MSwin32 - See: https://github.com/shlomif/Clipboard/issues/1 - Thanks to https://metacpan.org/pod/Dist::Zilla::Plugin::OSPrereqs . 0.22 2020-01-28 - Rebuild for order of 'NAME' and 'VERSION' sections in the generated POD documentation (see 0.001004 in https://metacpan.org/changes/distribution/Pod-Weaver-PluginBundle-SHLOMIF ). - VERSION used to appear before NAME. 0.21 2019-12-02 - Min version of Mac::Pasteboard for macOS Catalina compat - Thanks to William H. Gilmore 0.20 2019-04-18 - use xclip on cygwin/win32 if SSH_CONNECTION is set (rkitover) - use xclip if DISPLAY is set and OS is unknown (rkitover) - Apply doc patch from https://rt.cpan.org/Ticket/Display.html?id=64243 - Thanks to Andreas 0.19 2019-01-31 - Add copy_to_all_selections(). - Convert Changes to https://metacpan.org/pod/CPAN::Changes . - Code cleanups and modernisations. 0.18 2019-01-30 - Remove a stray .orig script. Teaching me to use git status... - Thanks to gregor herrmann . 0.17 2019-01-30 - Blacklist some Win32 and Mac-only prereqs in dist.ini. - Thanks to PERLANCAR . 0.16 2019-01-30 - Add support for Debian GNU/Hurd ( https://rt.cpan.org/Ticket/Display.html?id=116951 ) - Fix https://rt.cpan.org/Ticket/Display.html?id=98435 ; CVE-2014-5509 - clipedit Insecurely used temporary files. 0.15 2019-01-30 - https://rt.cpan.org/Ticket/Display.html?id=121056 - Fix for tests with no "." in @INC 0.14 2019-01-30 - SHLOMIF resumed maintenance - Convert to dzil . 0.12 2010-10-11 - Just added 'dragonfly' OS to recognized list (as *nix type) 0.11 2010-10-07 - Removed dependency on IO::All, Spiffy and IO::Run (!) - Switched Mac from pbcopy shelling to Mac::Pasteboard (Tom Wyant) - Improved error handling of Xclip.pm - Added at/clipfilter-test 0.10 2010-10-06 - Correct recognition of Windows in Makefile.PL (Alexandr Ciornii) - Makefile.PL version update (Alexandr Ciornii) - clipjoin now escapes weechat-type mess, and also now has -q flag. - clipbrowse now defaults to chromium-browser. - added at/clipjoin-test and at/clipbrowse-test - Updating email address and copyright date. - Minor text updates here and there. 0.09 2005-10-20 - Included Anton Berezin's Clipboard::Xclip fix for data that includes \n\n - Added scripts/clipfilter (also with Anton's feedback) - Removed dependency on IO::All - Cheated to make CPAN tests pass (turned 'xclip' dependency into warning). The real fix here is probably to Inline::C it - the xclip source is not that hard to read and pare down to a minimal set. 0.08 2005-06-21 - Fixed the MSWin32 OS string. Oops - I thought it was winSomething - Added a few more OS strings - clipaccumulate, the most obscure script in the batch! 0.07 2005-06-02 - fixed stupid typo in clipedit. Not sure how I let this slip by me. =\ 0.06 2005-06-01 - `editclip`, sure to be a celebrated entry in the world of clipboard editing! - Renamed `joinclip` to `clipjoin`, and `browseclip` to `clipbrowse`. Sorry if you already are in the habit of typing the others (I still am). - `clipbrowse` now opens URLs into a new tab. LICENSE100644001750001750 5013114752333647 14746 0ustar00shlomifshlomif000000000000Clipboard-0.32Terms of Perl 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" ---------------------------------------------------------------------------- GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU 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. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), 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 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 show them these terms so they know 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. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. 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 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 derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 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 License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. 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. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary 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 License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 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 Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing 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 for copying, distributing or modifying the Program or works based on it. 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. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. 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 this 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 this License, you may choose any version ever published by the Free Software Foundation. 10. 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 11. 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. 12. 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 ---------------------------------------------------------------------------- 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 dist.ini100644001750001750 122614752333647 15366 0ustar00shlomifshlomif000000000000Clipboard-0.32name = Clipboard version = 0.32 author = Shlomi Fish license = Perl_5 copyright_holder = Ryan King [@Filter] -bundle = @SHLOMIF -remove = AutoPrereqs -remove = License -remove = MakeMaker -remove = PodCoverageTests -remove = Readme -remove = Test::Compile dist = Clipboard github_name = Clipboard [AutoPrereqs] skip = ^Mac::Pasteboard$ skip = ^Win32::Clipboard$ [ExecDir] dir = scripts [Keywords] keyword = clipboard keyword = copy keyword = paste [OSPrereqs / ~darwin] Mac::Pasteboard = 0.011 [OSPrereqs / MSWin32] Win32::Clipboard = 0 [OSPrereqs / cygwin] Win32::Clipboard = 0 [ReadmeMarkdownFromPod] ; [Test::TidyAll] t000755001750001750 014752333647 14024 5ustar00shlomifshlomif000000000000Clipboard-0.32mock.t100644001750001750 41314752333647 15260 0ustar00shlomifshlomif000000000000Clipboard-0.32/tuse strict; use warnings; use lib './t/lib'; use Test::Clipboard; use Test::MockClipboard; $Clipboard::driver = 'PhonyClipboard'; my $str = 'Semirobotic Invasion'; Clipboard->copy($str); is($PhonyClipboard::board, $str, 'copy'); is(Clipboard->paste, $str, 'paste'); META.yml100644001750001750 2703014752333647 15214 0ustar00shlomifshlomif000000000000Clipboard-0.32--- abstract: 'Copy and paste with any OS' author: - 'Shlomi Fish ' build_requires: Module::Build: '0.28' Test::More: '0.88' lib: '0' configure_requires: Module::Build: '0.28' dynamic_config: 1 generated_by: 'Dist::Zilla version 6.032, CPAN::Meta::Converter version 2.150010' keywords: - clipboard - copy - paste license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: '1.4' name: Clipboard provides: Clipboard: file: lib/Clipboard.pm version: '0.32' Clipboard::MacPasteboard: file: lib/Clipboard/MacPasteboard.pm version: '0.32' Clipboard::WaylandClipboard: file: lib/Clipboard/WaylandClipboard.pm version: '0.32' Clipboard::Win32: file: lib/Clipboard/Win32.pm version: '0.32' Clipboard::Xclip: file: lib/Clipboard/Xclip.pm version: '0.32' Clipboard::Xsel: file: lib/Clipboard/Xsel.pm version: '0.32' requires: CGI: '0' File::Spec: '0' File::Temp: '0' IPC::Open2: '0' URI::Escape: '0' strict: '0' warnings: '0' resources: bugtracker: https://github.com/shlomif/Clipboard/issues homepage: http://metacpan.org/release/Clipboard repository: git://github.com/shlomif/Clipboard.git version: '0.32' x_Dist_Zilla: perl: version: '5.040001' plugins: - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: test type: requires name: '@Filter/TestMoreDoneTesting' version: '6.032' - class: Dist::Zilla::Plugin::ExecDir name: '@Filter/ExecDir' version: '6.032' - class: Dist::Zilla::Plugin::GatherDir config: Dist::Zilla::Plugin::GatherDir: exclude_filename: [] exclude_match: [] follow_symlinks: 0 include_dotfiles: 0 prefix: '' prune_directory: [] root: . name: '@Filter/GatherDir' version: '6.032' - class: Dist::Zilla::Plugin::ManifestSkip name: '@Filter/ManifestSkip' version: '6.032' - class: Dist::Zilla::Plugin::MetaYAML name: '@Filter/MetaYAML' version: '6.032' - class: Dist::Zilla::Plugin::PruneCruft name: '@Filter/PruneCruft' version: '6.032' - class: Dist::Zilla::Plugin::RunExtraTests config: Dist::Zilla::Role::TestRunner: default_jobs: 1 name: '@Filter/RunExtraTests' version: '0.029' - class: Dist::Zilla::Plugin::ShareDir name: '@Filter/ShareDir' version: '6.032' - class: Dist::Zilla::Plugin::CheckChangesHasContent name: '@Filter/CheckChangesHasContent' version: '0.011' - class: Dist::Zilla::Plugin::ConfirmRelease name: '@Filter/ConfirmRelease' version: '6.032' - class: Dist::Zilla::Plugin::Manifest name: '@Filter/Manifest' version: '6.032' - class: Dist::Zilla::Plugin::MetaConfig name: '@Filter/MetaConfig' version: '6.032' - class: Dist::Zilla::Plugin::MetaJSON name: '@Filter/MetaJSON' version: '6.032' - class: Dist::Zilla::Plugin::MetaProvides::Package config: Dist::Zilla::Plugin::MetaProvides::Package: finder_objects: - class: Dist::Zilla::Plugin::FinderCode name: '@Filter/MetaProvides::Package/AUTOVIV/:InstallModulesPM' version: '6.032' include_underscores: 0 Dist::Zilla::Role::MetaProvider::Provider: $Dist::Zilla::Role::MetaProvider::Provider::VERSION: '2.002004' inherit_missing: 1 inherit_version: 1 meta_noindex: 1 Dist::Zilla::Role::ModuleMetadata: Module::Metadata: '1.000038' version: '0.006' name: '@Filter/MetaProvides::Package' version: '2.004003' - class: Dist::Zilla::Plugin::MetaResources name: '@Filter/MetaResources' version: '6.032' - class: Dist::Zilla::Plugin::ModuleBuild config: Dist::Zilla::Role::TestRunner: default_jobs: 1 name: '@Filter/ModuleBuild' version: '6.032' - class: Dist::Zilla::Plugin::PkgVersion name: '@Filter/PkgVersion' version: '6.032' - class: Dist::Zilla::Plugin::PodSyntaxTests name: '@Filter/PodSyntaxTests' version: '6.032' - class: Dist::Zilla::Plugin::Test::CPAN::Changes config: Dist::Zilla::Plugin::Test::CPAN::Changes: changelog: Changes filename: xt/release/cpan-changes.t name: '@Filter/Test::CPAN::Changes' version: '0.013' - class: Dist::Zilla::Plugin::Test::EOL config: Dist::Zilla::Plugin::Test::EOL: filename: xt/author/eol.t finder: - ':ExecFiles' - ':InstallModules' - ':TestFiles' trailing_whitespace: 1 name: '@Filter/Test::EOL' version: '0.19' - class: Dist::Zilla::Plugin::Test::NoTabs config: Dist::Zilla::Plugin::Test::NoTabs: filename: xt/author/no-tabs.t finder: - ':InstallModules' - ':ExecFiles' - ':TestFiles' name: '@Filter/Test::NoTabs' version: '0.15' - class: Dist::Zilla::Plugin::Test::TrailingSpace name: '@Filter/Test::TrailingSpace' version: ~ - class: Dist::Zilla::Plugin::TestRelease name: '@Filter/TestRelease' version: '6.032' - class: Dist::Zilla::Plugin::PodWeaver config: Dist::Zilla::Plugin::PodWeaver: finder: - ':InstallModules' - ':PerlExecFiles' plugins: - class: Pod::Weaver::Plugin::SingleEncoding name: '@SHLOMIF/SingleEncoding' version: '4.020' - class: Pod::Weaver::Plugin::WikiDoc name: '@SHLOMIF/WikiDoc' version: '0.093004' - class: Pod::Weaver::Plugin::EnsurePod5 name: '@CorePrep/EnsurePod5' version: '4.020' - class: Pod::Weaver::Plugin::H1Nester name: '@CorePrep/H1Nester' version: '4.020' - class: Pod::Weaver::Section::Generic name: '@SHLOMIF/Name' version: '4.020' - class: Pod::Weaver::Section::Version name: '@SHLOMIF/Version' version: '4.020' - class: Pod::Weaver::Section::Region name: '@SHLOMIF/Prelude' version: '4.020' - class: Pod::Weaver::Section::Generic name: '@SHLOMIF/Synopsis' version: '4.020' - class: Pod::Weaver::Section::Generic name: '@SHLOMIF/Description' version: '4.020' - class: Pod::Weaver::Section::Generic name: '@SHLOMIF/Usage' version: '4.020' - class: Pod::Weaver::Section::Generic name: '@SHLOMIF/Overview' version: '4.020' - class: Pod::Weaver::Section::Generic name: '@SHLOMIF/Stability' version: '4.020' - class: Pod::Weaver::Section::Collect name: Requirements version: '4.020' - class: Pod::Weaver::Section::Collect name: Attributes version: '4.020' - class: Pod::Weaver::Section::Collect name: Constructors version: '4.020' - class: Pod::Weaver::Section::Collect name: Methods version: '4.020' - class: Pod::Weaver::Section::Collect name: Functions version: '4.020' - class: Pod::Weaver::Section::Leftovers name: '@SHLOMIF/Leftovers' version: '4.020' - class: Pod::Weaver::Section::Region name: '@SHLOMIF/postlude' version: '4.020' - class: Pod::Weaver::Section::Support name: '@SHLOMIF/Support' version: '1.014' - class: Pod::Weaver::Section::Authors name: '@SHLOMIF/Authors' version: '4.020' - class: Pod::Weaver::Section::Bugs name: '@SHLOMIF/Bugs' version: '4.020' - class: Pod::Weaver::Section::Contributors name: '@SHLOMIF/Contributors' version: '0.009' - class: Pod::Weaver::Section::Legal name: '@SHLOMIF/Legal' version: '4.020' - class: Pod::Weaver::Plugin::Transformer name: '@SHLOMIF/List' version: '4.020' name: '@Filter/PodWeaver' version: '4.010' - class: Dist::Zilla::Plugin::UploadToCPAN name: '@Filter/UploadToCPAN' version: '6.032' - class: Dist::Zilla::Plugin::AutoPrereqs name: AutoPrereqs version: '6.032' - class: Dist::Zilla::Plugin::ExecDir name: ExecDir version: '6.032' - class: Dist::Zilla::Plugin::Keywords config: Dist::Zilla::Plugin::Keywords: keywords: - clipboard - copy - paste name: Keywords version: '0.007' - class: Dist::Zilla::Plugin::OSPrereqs config: Dist::Zilla::Plugin::OSPrereqs: os: '~darwin' name: '~darwin' version: '0.011' - class: Dist::Zilla::Plugin::OSPrereqs config: Dist::Zilla::Plugin::OSPrereqs: os: MSWin32 name: MSWin32 version: '0.011' - class: Dist::Zilla::Plugin::OSPrereqs config: Dist::Zilla::Plugin::OSPrereqs: os: cygwin name: cygwin version: '0.011' - class: Dist::Zilla::Plugin::ReadmeMarkdownFromPod config: Dist::Zilla::Role::FileWatcher: version: '0.006' name: ReadmeMarkdownFromPod version: '0.141140' - class: Dist::Zilla::Plugin::FinderCode name: ':InstallModules' version: '6.032' - class: Dist::Zilla::Plugin::FinderCode name: ':IncModules' version: '6.032' - class: Dist::Zilla::Plugin::FinderCode name: ':TestFiles' version: '6.032' - class: Dist::Zilla::Plugin::FinderCode name: ':ExtraTestFiles' version: '6.032' - class: Dist::Zilla::Plugin::FinderCode name: ':ExecFiles' version: '6.032' - class: Dist::Zilla::Plugin::FinderCode name: ':PerlExecFiles' version: '6.032' - class: Dist::Zilla::Plugin::FinderCode name: ':ShareFiles' version: '6.032' - class: Dist::Zilla::Plugin::FinderCode name: ':MainModule' version: '6.032' - class: Dist::Zilla::Plugin::FinderCode name: ':AllFiles' version: '6.032' - class: Dist::Zilla::Plugin::FinderCode name: ':NoFiles' version: '6.032' - class: Dist::Zilla::Plugin::FinderCode name: '@Filter/MetaProvides::Package/AUTOVIV/:InstallModulesPM' version: '6.032' zilla: class: Dist::Zilla::Dist::Builder config: is_trial: 0 version: '6.032' x_generated_by_perl: v5.40.1 x_serialization_backend: 'YAML::Tiny version 1.74' x_spdx_expression: 'Artistic-1.0-Perl OR GPL-1.0-or-later' MANIFEST100644001750001750 131214752333647 15047 0ustar00shlomifshlomif000000000000Clipboard-0.32# This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.032. Build.PL Changes LICENSE MANIFEST MANIFEST.SKIP META.json META.yml README.mkdn at/all at/all-xclip-selections at/clipbrowse-test at/clipfilter-test at/clipjoin-test at/pxclip at/run dist.ini lib/Clipboard.pm lib/Clipboard/MacPasteboard.pm lib/Clipboard/WaylandClipboard.pm lib/Clipboard/Win32.pm lib/Clipboard/Xclip.pm lib/Clipboard/Xsel.pm scripts/clipaccumulate scripts/clipbrowse scripts/clipedit scripts/clipfilter scripts/clipjoin t/drivers.t t/lib/Test/Clipboard.pm t/lib/Test/MockClipboard.pm t/mock.t weaver.ini xt/author/eol.t xt/author/no-tabs.t xt/author/pod-syntax.t xt/release/cpan-changes.t xt/release/trailing-space.t Build.PL100644001750001750 303114752333647 15212 0ustar00shlomifshlomif000000000000Clipboard-0.32 # This file was automatically generated by Dist::Zilla::Plugin::ModuleBuild v6.032. use strict; use warnings; use Module::Build 0.28; my %module_build_args = ( "build_requires" => { "Module::Build" => "0.28" }, "configure_requires" => { "Module::Build" => "0.28" }, "dist_abstract" => "Copy and paste with any OS", "dist_author" => [ "Shlomi Fish " ], "dist_name" => "Clipboard", "dist_version" => "0.32", "license" => "perl", "module_name" => "Clipboard", "recursive_test_files" => 1, "requires" => { "CGI" => 0, "File::Spec" => 0, "File::Temp" => 0, "IPC::Open2" => 0, "URI::Escape" => 0, "strict" => 0, "warnings" => 0 }, "script_files" => [ "scripts/clipaccumulate", "scripts/clipbrowse", "scripts/clipedit", "scripts/clipfilter", "scripts/clipjoin" ], "test_requires" => { "Test::More" => "0.88", "lib" => 0 } ); my %fallback_build_requires = ( "Module::Build" => "0.28", "Test::More" => "0.88", "lib" => 0 ); unless ( eval { Module::Build->VERSION(0.4004) } ) { delete $module_build_args{test_requires}; $module_build_args{build_requires} = \%fallback_build_requires; } if ( $^O =~ /darwin/i ) { $module_build_args{requires}{'Mac::Pasteboard'} = '0.011'; } if ( $^O eq 'MSWin32' ) { $module_build_args{requires}{'Win32::Clipboard'} = '0'; } if ( $^O eq 'cygwin' ) { $module_build_args{requires}{'Win32::Clipboard'} = '0'; } my $build = Module::Build->new(%module_build_args); $build->create_build_script; pxclip100755001750001750 104514752333647 15552 0ustar00shlomifshlomif000000000000Clipboard-0.32/at#!/bin/sh # Useful for exploring the way X selections work. # For example, run watch -n1 pxclip in one xterm, then highlight something in # another. Now single-click in the xterm to remove the highlighting. Now # highlight something in Firefox. Now highlight something in the xterm again. # Now switch back to Firefox, and hit ^C. # Weird, huh? for n in primary secondary clipboard buffer; do echo "== $n ==" xclip -o -selection "$n" echo done echo "== Clipboard.pm default ==" perl -Ilib -MClipboard -e "print Clipboard->paste" echo META.json100644001750001750 4441614752333647 15373 0ustar00shlomifshlomif000000000000Clipboard-0.32{ "abstract" : "Copy and paste with any OS", "author" : [ "Shlomi Fish " ], "dynamic_config" : 1, "generated_by" : "Dist::Zilla version 6.032, CPAN::Meta::Converter version 2.150010", "keywords" : [ "clipboard", "copy", "paste" ], "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : 2 }, "name" : "Clipboard", "prereqs" : { "build" : { "requires" : { "Module::Build" : "0.28" } }, "configure" : { "requires" : { "Module::Build" : "0.28" } }, "develop" : { "requires" : { "Test::CPAN::Changes" : "0.19", "Test::EOL" : "0", "Test::More" : "0.96", "Test::NoTabs" : "0", "Test::Pod" : "1.41", "Test::TrailingSpace" : "0.0203" } }, "runtime" : { "requires" : { "CGI" : "0", "File::Spec" : "0", "File::Temp" : "0", "IPC::Open2" : "0", "URI::Escape" : "0", "strict" : "0", "warnings" : "0" } }, "test" : { "requires" : { "Test::More" : "0.88", "lib" : "0" } } }, "provides" : { "Clipboard" : { "file" : "lib/Clipboard.pm", "version" : "0.32" }, "Clipboard::MacPasteboard" : { "file" : "lib/Clipboard/MacPasteboard.pm", "version" : "0.32" }, "Clipboard::WaylandClipboard" : { "file" : "lib/Clipboard/WaylandClipboard.pm", "version" : "0.32" }, "Clipboard::Win32" : { "file" : "lib/Clipboard/Win32.pm", "version" : "0.32" }, "Clipboard::Xclip" : { "file" : "lib/Clipboard/Xclip.pm", "version" : "0.32" }, "Clipboard::Xsel" : { "file" : "lib/Clipboard/Xsel.pm", "version" : "0.32" } }, "release_status" : "stable", "resources" : { "bugtracker" : { "web" : "https://github.com/shlomif/Clipboard/issues" }, "homepage" : "http://metacpan.org/release/Clipboard", "repository" : { "type" : "git", "url" : "git://github.com/shlomif/Clipboard.git", "web" : "https://github.com/shlomif/Clipboard" } }, "version" : "0.32", "x_Dist_Zilla" : { "perl" : { "version" : "5.040001" }, "plugins" : [ { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "test", "type" : "requires" } }, "name" : "@Filter/TestMoreDoneTesting", "version" : "6.032" }, { "class" : "Dist::Zilla::Plugin::ExecDir", "name" : "@Filter/ExecDir", "version" : "6.032" }, { "class" : "Dist::Zilla::Plugin::GatherDir", "config" : { "Dist::Zilla::Plugin::GatherDir" : { "exclude_filename" : [], "exclude_match" : [], "follow_symlinks" : 0, "include_dotfiles" : 0, "prefix" : "", "prune_directory" : [], "root" : "." } }, "name" : "@Filter/GatherDir", "version" : "6.032" }, { "class" : "Dist::Zilla::Plugin::ManifestSkip", "name" : "@Filter/ManifestSkip", "version" : "6.032" }, { "class" : "Dist::Zilla::Plugin::MetaYAML", "name" : "@Filter/MetaYAML", "version" : "6.032" }, { "class" : "Dist::Zilla::Plugin::PruneCruft", "name" : "@Filter/PruneCruft", "version" : "6.032" }, { "class" : "Dist::Zilla::Plugin::RunExtraTests", "config" : { "Dist::Zilla::Role::TestRunner" : { "default_jobs" : 1 } }, "name" : "@Filter/RunExtraTests", "version" : "0.029" }, { "class" : "Dist::Zilla::Plugin::ShareDir", "name" : "@Filter/ShareDir", "version" : "6.032" }, { "class" : "Dist::Zilla::Plugin::CheckChangesHasContent", "name" : "@Filter/CheckChangesHasContent", "version" : "0.011" }, { "class" : "Dist::Zilla::Plugin::ConfirmRelease", "name" : "@Filter/ConfirmRelease", "version" : "6.032" }, { "class" : "Dist::Zilla::Plugin::Manifest", "name" : "@Filter/Manifest", "version" : "6.032" }, { "class" : "Dist::Zilla::Plugin::MetaConfig", "name" : "@Filter/MetaConfig", "version" : "6.032" }, { "class" : "Dist::Zilla::Plugin::MetaJSON", "name" : "@Filter/MetaJSON", "version" : "6.032" }, { "class" : "Dist::Zilla::Plugin::MetaProvides::Package", "config" : { "Dist::Zilla::Plugin::MetaProvides::Package" : { "finder_objects" : [ { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : "@Filter/MetaProvides::Package/AUTOVIV/:InstallModulesPM", "version" : "6.032" } ], "include_underscores" : 0 }, "Dist::Zilla::Role::MetaProvider::Provider" : { "$Dist::Zilla::Role::MetaProvider::Provider::VERSION" : "2.002004", "inherit_missing" : 1, "inherit_version" : 1, "meta_noindex" : 1 }, "Dist::Zilla::Role::ModuleMetadata" : { "Module::Metadata" : "1.000038", "version" : "0.006" } }, "name" : "@Filter/MetaProvides::Package", "version" : "2.004003" }, { "class" : "Dist::Zilla::Plugin::MetaResources", "name" : "@Filter/MetaResources", "version" : "6.032" }, { "class" : "Dist::Zilla::Plugin::ModuleBuild", "config" : { "Dist::Zilla::Role::TestRunner" : { "default_jobs" : 1 } }, "name" : "@Filter/ModuleBuild", "version" : "6.032" }, { "class" : "Dist::Zilla::Plugin::PkgVersion", "name" : "@Filter/PkgVersion", "version" : "6.032" }, { "class" : "Dist::Zilla::Plugin::PodSyntaxTests", "name" : "@Filter/PodSyntaxTests", "version" : "6.032" }, { "class" : "Dist::Zilla::Plugin::Test::CPAN::Changes", "config" : { "Dist::Zilla::Plugin::Test::CPAN::Changes" : { "changelog" : "Changes", "filename" : "xt/release/cpan-changes.t" } }, "name" : "@Filter/Test::CPAN::Changes", "version" : "0.013" }, { "class" : "Dist::Zilla::Plugin::Test::EOL", "config" : { "Dist::Zilla::Plugin::Test::EOL" : { "filename" : "xt/author/eol.t", "finder" : [ ":ExecFiles", ":InstallModules", ":TestFiles" ], "trailing_whitespace" : 1 } }, "name" : "@Filter/Test::EOL", "version" : "0.19" }, { "class" : "Dist::Zilla::Plugin::Test::NoTabs", "config" : { "Dist::Zilla::Plugin::Test::NoTabs" : { "filename" : "xt/author/no-tabs.t", "finder" : [ ":InstallModules", ":ExecFiles", ":TestFiles" ] } }, "name" : "@Filter/Test::NoTabs", "version" : "0.15" }, { "class" : "Dist::Zilla::Plugin::Test::TrailingSpace", "name" : "@Filter/Test::TrailingSpace", "version" : null }, { "class" : "Dist::Zilla::Plugin::TestRelease", "name" : "@Filter/TestRelease", "version" : "6.032" }, { "class" : "Dist::Zilla::Plugin::PodWeaver", "config" : { "Dist::Zilla::Plugin::PodWeaver" : { "finder" : [ ":InstallModules", ":PerlExecFiles" ], "plugins" : [ { "class" : "Pod::Weaver::Plugin::SingleEncoding", "name" : "@SHLOMIF/SingleEncoding", "version" : "4.020" }, { "class" : "Pod::Weaver::Plugin::WikiDoc", "name" : "@SHLOMIF/WikiDoc", "version" : "0.093004" }, { "class" : "Pod::Weaver::Plugin::EnsurePod5", "name" : "@CorePrep/EnsurePod5", "version" : "4.020" }, { "class" : "Pod::Weaver::Plugin::H1Nester", "name" : "@CorePrep/H1Nester", "version" : "4.020" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "@SHLOMIF/Name", "version" : "4.020" }, { "class" : "Pod::Weaver::Section::Version", "name" : "@SHLOMIF/Version", "version" : "4.020" }, { "class" : "Pod::Weaver::Section::Region", "name" : "@SHLOMIF/Prelude", "version" : "4.020" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "@SHLOMIF/Synopsis", "version" : "4.020" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "@SHLOMIF/Description", "version" : "4.020" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "@SHLOMIF/Usage", "version" : "4.020" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "@SHLOMIF/Overview", "version" : "4.020" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "@SHLOMIF/Stability", "version" : "4.020" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "Requirements", "version" : "4.020" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "Attributes", "version" : "4.020" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "Constructors", "version" : "4.020" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "Methods", "version" : "4.020" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "Functions", "version" : "4.020" }, { "class" : "Pod::Weaver::Section::Leftovers", "name" : "@SHLOMIF/Leftovers", "version" : "4.020" }, { "class" : "Pod::Weaver::Section::Region", "name" : "@SHLOMIF/postlude", "version" : "4.020" }, { "class" : "Pod::Weaver::Section::Support", "name" : "@SHLOMIF/Support", "version" : "1.014" }, { "class" : "Pod::Weaver::Section::Authors", "name" : "@SHLOMIF/Authors", "version" : "4.020" }, { "class" : "Pod::Weaver::Section::Bugs", "name" : "@SHLOMIF/Bugs", "version" : "4.020" }, { "class" : "Pod::Weaver::Section::Contributors", "name" : "@SHLOMIF/Contributors", "version" : "0.009" }, { "class" : "Pod::Weaver::Section::Legal", "name" : "@SHLOMIF/Legal", "version" : "4.020" }, { "class" : "Pod::Weaver::Plugin::Transformer", "name" : "@SHLOMIF/List", "version" : "4.020" } ] } }, "name" : "@Filter/PodWeaver", "version" : "4.010" }, { "class" : "Dist::Zilla::Plugin::UploadToCPAN", "name" : "@Filter/UploadToCPAN", "version" : "6.032" }, { "class" : "Dist::Zilla::Plugin::AutoPrereqs", "name" : "AutoPrereqs", "version" : "6.032" }, { "class" : "Dist::Zilla::Plugin::ExecDir", "name" : "ExecDir", "version" : "6.032" }, { "class" : "Dist::Zilla::Plugin::Keywords", "config" : { "Dist::Zilla::Plugin::Keywords" : { "keywords" : [ "clipboard", "copy", "paste" ] } }, "name" : "Keywords", "version" : "0.007" }, { "class" : "Dist::Zilla::Plugin::OSPrereqs", "config" : { "Dist::Zilla::Plugin::OSPrereqs" : { "os" : "~darwin" } }, "name" : "~darwin", "version" : "0.011" }, { "class" : "Dist::Zilla::Plugin::OSPrereqs", "config" : { "Dist::Zilla::Plugin::OSPrereqs" : { "os" : "MSWin32" } }, "name" : "MSWin32", "version" : "0.011" }, { "class" : "Dist::Zilla::Plugin::OSPrereqs", "config" : { "Dist::Zilla::Plugin::OSPrereqs" : { "os" : "cygwin" } }, "name" : "cygwin", "version" : "0.011" }, { "class" : "Dist::Zilla::Plugin::ReadmeMarkdownFromPod", "config" : { "Dist::Zilla::Role::FileWatcher" : { "version" : "0.006" } }, "name" : "ReadmeMarkdownFromPod", "version" : "0.141140" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":InstallModules", "version" : "6.032" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":IncModules", "version" : "6.032" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":TestFiles", "version" : "6.032" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ExtraTestFiles", "version" : "6.032" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ExecFiles", "version" : "6.032" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":PerlExecFiles", "version" : "6.032" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ShareFiles", "version" : "6.032" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":MainModule", "version" : "6.032" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":AllFiles", "version" : "6.032" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":NoFiles", "version" : "6.032" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : "@Filter/MetaProvides::Package/AUTOVIV/:InstallModulesPM", "version" : "6.032" } ], "zilla" : { "class" : "Dist::Zilla::Dist::Builder", "config" : { "is_trial" : 0 }, "version" : "6.032" } }, "x_generated_by_perl" : "v5.40.1", "x_serialization_backend" : "Cpanel::JSON::XS version 4.38", "x_spdx_expression" : "Artistic-1.0-Perl OR GPL-1.0-or-later" } weaver.ini100644001750001750 1314752333647 15645 0ustar00shlomifshlomif000000000000Clipboard-0.32[@SHLOMIF] README.mkdn100644001750001750 1043214752333647 15551 0ustar00shlomifshlomif000000000000Clipboard-0.32# NAME Clipboard - Copy and paste with any OS # VERSION version 0.32 # SYNOPSIS use Clipboard; print Clipboard->paste; Clipboard->copy('foo'); # Same as copy on non-X / non-Xclip systems Clipboard->copy_to_all_selections('text_to_copy'); Clipboard->cut() is an alias for copy(). copy() is the preferred method, because we're not really "cutting" anything. # DESCRIPTION Who doesn't remember the first time they learned to copy and paste, and generated an exponentially growing text document? Yes, that's right, clipboards are magical. With Clipboard.pm, this magic is now trivial to access, in a cross-platform-consistent API, from your Perl code. # STATUS Seems to be working well for Linux, OSX, \*BSD, and Windows. I use it every day on Linux, so I think I've got most of the details hammered out (X selections are kind of weird). Please let me know if you encounter any problems in your setup. # AUTHOR Ryan King # COPYRIGHT Copyright (c) 2010. Ryan King. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://www.perl.com/perl/misc/Artistic.html # SEE ALSO [clipaccumulate(1)](http://man.he.net/man1/clipaccumulate), [clipbrowse(1)](http://man.he.net/man1/clipbrowse), [clipedit(1)](http://man.he.net/man1/clipedit), [clipfilter(1)](http://man.he.net/man1/clipfilter), [clipjoin(1)](http://man.he.net/man1/clipjoin) # SUPPORT ## Websites The following websites have more information about this module, and may be of help to you. As always, in addition to those websites please use your favorite search engine to discover more resources. - MetaCPAN A modern, open-source CPAN search engine, useful to view POD in HTML format. [https://metacpan.org/release/Clipboard](https://metacpan.org/release/Clipboard) - RT: CPAN's Bug Tracker The RT ( Request Tracker ) website is the default bug/issue tracking system for CPAN. [https://rt.cpan.org/Public/Dist/Display.html?Name=Clipboard](https://rt.cpan.org/Public/Dist/Display.html?Name=Clipboard) - CPANTS The CPANTS is a website that analyzes the Kwalitee ( code metrics ) of a distribution. [http://cpants.cpanauthors.org/dist/Clipboard](http://cpants.cpanauthors.org/dist/Clipboard) - CPAN Testers The CPAN Testers is a network of smoke testers who run automated tests on uploaded CPAN distributions. [http://www.cpantesters.org/distro/C/Clipboard](http://www.cpantesters.org/distro/C/Clipboard) - CPAN Testers Matrix The CPAN Testers Matrix is a website that provides a visual overview of the test results for a distribution on various Perls/platforms. [http://matrix.cpantesters.org/?dist=Clipboard](http://matrix.cpantesters.org/?dist=Clipboard) - CPAN Testers Dependencies The CPAN Testers Dependencies is a website that shows a chart of the test results of all dependencies for a distribution. [http://deps.cpantesters.org/?module=Clipboard](http://deps.cpantesters.org/?module=Clipboard) ## Bugs / Feature Requests Please report any bugs or feature requests by email to `bug-clipboard at rt.cpan.org`, or through the web interface at [https://rt.cpan.org/Public/Bug/Report.html?Queue=Clipboard](https://rt.cpan.org/Public/Bug/Report.html?Queue=Clipboard). You will be automatically notified of any progress on the request by the system. ## Source Code The code is open to the world, and available for you to hack on. Please feel free to browse it and play with it, or whatever. If you want to contribute patches, please send me a diff or prod me to pull from your repository :) [https://github.com/shlomif/Clipboard](https://github.com/shlomif/Clipboard) git clone git://github.com/shlomif/Clipboard.git # AUTHOR Shlomi Fish # BUGS Please report any bugs or feature requests on the bugtracker website [https://github.com/shlomif/Clipboard/issues](https://github.com/shlomif/Clipboard/issues) When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature. # COPYRIGHT AND LICENSE This software is copyright (c) 2025 by Ryan King . This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. drivers.t100644001750001750 302014752333647 16022 0ustar00shlomifshlomif000000000000Clipboard-0.32/tuse strict; use warnings; use lib './t/lib'; use Test::Clipboard; my %map = qw( linux Xclip freebsd Xclip netbsd Xclip openbsd Xclip dragonfly Xclip Win32 Win32 cygwin Win32 darwin MacPasteboard ); use_ok 'Clipboard'; # Preferentially use Clipboard::WaylandClipboard if we see WAYLAND_DISPLAY if (exists($ENV{WAYLAND_DISPLAY}) && length($ENV{WAYLAND_DISPLAY})) { use_ok 'Clipboard::WaylandClipboard'; foreach my $os (sort keys %map) { $map{$os} = 'WaylandClipboard' if ($map{$os} ne 'Win32'); } } else { use_ok 'Clipboard::Xclip'; } if ( exists $ENV{SSH_CONNECTION} && Clipboard::Xclip::xclip_available() ) { $map{Win32} = 'Xclip'; $map{cygwin} = 'Xclip'; } is( Clipboard->find_driver($_), $map{$_}, $_ ) for keys %map; my $drv = Clipboard->find_driver($^O); ok( exists $INC{"Clipboard/$drv.pm"}, "Driver-check ($drv)" ); eval { local %ENV = %ENV; delete $ENV{DISPLAY}; delete $ENV{WAYLAND_DISPLAY}; Clipboard->find_driver('NonOS'); }; like( $@, qr/is not yet supported/, 'find_driver correctly fails with no DISPLAY' ); SKIP: { if ( not $ENV{AUTHOR_TESTING} ) { skip 'Author test', 2; } my $display_drv = do { local %ENV = %ENV; $ENV{DISPLAY} = ':0.0'; Clipboard->find_driver('NonOS'); }; is $display_drv, 'Xsel', 'driver is Xclip on unknown OS with DISPLAY set'; is( $Clipboard::driver, "Clipboard::$drv", "Actually loaded $drv" ); my $silence_stupid_warning = $Clipboard::driver; } MANIFEST.SKIP100644001750001750 314752333647 15530 0ustar00shlomifshlomif000000000000Clipboard-0.32~$ author000755001750001750 014752333647 15516 5ustar00shlomifshlomif000000000000Clipboard-0.32/xteol.t100644001750001750 121014752333647 16614 0ustar00shlomifshlomif000000000000Clipboard-0.32/xt/authoruse strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::EOL 0.19 use Test::More 0.88; use Test::EOL; my @files = ( 'lib/Clipboard.pm', 'lib/Clipboard/MacPasteboard.pm', 'lib/Clipboard/WaylandClipboard.pm', 'lib/Clipboard/Win32.pm', 'lib/Clipboard/Xclip.pm', 'lib/Clipboard/Xsel.pm', 'scripts/clipaccumulate', 'scripts/clipbrowse', 'scripts/clipedit', 'scripts/clipfilter', 'scripts/clipjoin', 't/drivers.t', 't/lib/Test/Clipboard.pm', 't/lib/Test/MockClipboard.pm', 't/mock.t' ); eol_unix_ok($_, { trailing_whitespace => 1 }) foreach @files; done_testing; clipjoin-test100755001750001750 130614752333647 17037 0ustar00shlomifshlomif000000000000Clipboard-0.32/at#!/usr/bin/perl use strict; use warnings; use lib 'lib'; use Clipboard; my $CJ = 'perl -Ilib scripts/clipjoin'; print "# Using $CJ and $INC{'Clipboard.pm'}\n"; my %tests = ( "http://as\ndf.com" => 'http://asdf.com', "http://as\n | df.com" => 'http://asdf.com', "http://as\n+df.com" => 'http://asdf.com', "A\n tall \nquote." => 'A tall quote.', # html-ish interpretation of space ); for my $input (keys %tests) { my $expected = $tests{$input}; Clipboard->copy($input); system("$CJ -q") == 0 or die "$CJ failed: $!"; my $actual = Clipboard->paste; if ($actual ne $expected) { print "[$actual] != [$expected]\n"; } else { print "$actual ok\n"; } } lib000755001750001750 014752333647 14327 5ustar00shlomifshlomif000000000000Clipboard-0.32Clipboard.pm100644001750001750 1512414752333647 16747 0ustar00shlomifshlomif000000000000Clipboard-0.32/libpackage Clipboard; $Clipboard::VERSION = '0.32'; use strict; use warnings; our $driver; sub copy { my $self = shift; return $driver->copy(@_); } sub copy_to_all_selections { my $self = shift; my $meth = $driver->can('copy_to_all_selections'); return $meth ? $meth->($driver, @_) : $driver->copy(@_); } sub cut { goto © } sub paste { my $self = shift; return $driver->paste(@_); } sub bind_os { my $driver = shift; return map { $_ => $driver } @_; } sub find_driver { my $self = shift; my $os = shift; my %drivers = ( # list stolen from Module::Build, with some modifications (for # example, cygwin doesn't count as Unix here, because it will # use the Win32 clipboard.) bind_os(Xsel => qw(linux bsd$ aix bsdos dec_osf dgux dynixptx gnu hpux irix dragonfly machten next os2 sco_sv solaris sunos svr4 svr5 unicos unicosmk)), bind_os(Xclip => qw(linux bsd$ aix bsdos dec_osf dgux dynixptx gnu hpux irix dragonfly machten next os2 sco_sv solaris sunos svr4 svr5 unicos unicosmk)), #bind_os(WaylandClipboard => qw(linux)), # Do not uncomment this line... bind_os(MacPasteboard => qw(darwin)), ); if ($os =~ /^(?:mswin|win|cygwin)/i) { # If we are connected to windows through ssh, and xclip is # available, use it. if (exists $ENV{SSH_CONNECTION}) { local $SIG{__WARN__} = sub {}; require Clipboard::Xsel; return 'Xsel' if Clipboard::Xsel::xsel_available(); require Clipboard::Xclip; return 'Xclip' if Clipboard::Xclip::xclip_available(); } return 'Win32'; } # Preferentially use Clipboard::WaylandClipboard if we see WAYLAND_DISPLAY if (exists($ENV{WAYLAND_DISPLAY}) && length($ENV{WAYLAND_DISPLAY})) { require Clipboard::WaylandClipboard; return 'WaylandClipboard' if Clipboard::WaylandClipboard::available(); } foreach my $d (sort keys %drivers) { if ($os =~ /$d/i) { return $drivers{$d}; } } # use xsel/xclip on unknown OSes that seem to have a DISPLAY if (exists($ENV{DISPLAY})) { require Clipboard::Xsel; return 'Xsel' if Clipboard::Xsel::xsel_available(); require Clipboard::Xclip; return 'Xclip' if Clipboard::Xclip::xclip_available(); } die "The $os system is not yet supported by Clipboard.pm. Please email rking\@panoptic.com and tell him about this.\n"; } sub import { my $self = shift; my $drv = Clipboard->find_driver($^O); require "Clipboard/$drv.pm"; $driver = "Clipboard::$drv"; return; } 1; # vi:tw=72 __END__ =pod =encoding UTF-8 =head1 NAME Clipboard - Copy and paste with any OS =head1 VERSION version 0.32 =head1 SYNOPSIS use Clipboard; print Clipboard->paste; Clipboard->copy('foo'); # Same as copy on non-X / non-Xclip systems Clipboard->copy_to_all_selections('text_to_copy'); Clipboard->cut() is an alias for copy(). copy() is the preferred method, because we're not really "cutting" anything. =head1 DESCRIPTION Who doesn't remember the first time they learned to copy and paste, and generated an exponentially growing text document? Yes, that's right, clipboards are magical. With Clipboard.pm, this magic is now trivial to access, in a cross-platform-consistent API, from your Perl code. =head1 STATUS Seems to be working well for Linux, OSX, *BSD, and Windows. I use it every day on Linux, so I think I've got most of the details hammered out (X selections are kind of weird). Please let me know if you encounter any problems in your setup. =head1 AUTHOR Ryan King =head1 COPYRIGHT Copyright (c) 2010. Ryan King. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://www.perl.com/perl/misc/Artistic.html =head1 SEE ALSO L, L, L, L, L =for :stopwords cpan testmatrix url bugtracker rt cpants kwalitee diff irc mailto metadata placeholders metacpan =head1 SUPPORT =head2 Websites The following websites have more information about this module, and may be of help to you. As always, in addition to those websites please use your favorite search engine to discover more resources. =over 4 =item * MetaCPAN A modern, open-source CPAN search engine, useful to view POD in HTML format. L =item * RT: CPAN's Bug Tracker The RT ( Request Tracker ) website is the default bug/issue tracking system for CPAN. L =item * CPANTS The CPANTS is a website that analyzes the Kwalitee ( code metrics ) of a distribution. L =item * CPAN Testers The CPAN Testers is a network of smoke testers who run automated tests on uploaded CPAN distributions. L =item * CPAN Testers Matrix The CPAN Testers Matrix is a website that provides a visual overview of the test results for a distribution on various Perls/platforms. L =item * CPAN Testers Dependencies The CPAN Testers Dependencies is a website that shows a chart of the test results of all dependencies for a distribution. L =back =head2 Bugs / Feature Requests Please report any bugs or feature requests by email to C, or through the web interface at L. You will be automatically notified of any progress on the request by the system. =head2 Source Code The code is open to the world, and available for you to hack on. Please feel free to browse it and play with it, or whatever. If you want to contribute patches, please send me a diff or prod me to pull from your repository :) L git clone git://github.com/shlomif/Clipboard.git =head1 AUTHOR Shlomi Fish =head1 BUGS Please report any bugs or feature requests on the bugtracker website L When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature. =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2025 by Ryan King . This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut scripts000755001750001750 014752333647 15250 5ustar00shlomifshlomif000000000000Clipboard-0.32clipjoin100755001750001750 1122514752333647 17166 0ustar00shlomifshlomif000000000000Clipboard-0.32/scripts#!/usr/bin/perl use strict; use warnings; # PODNAME: clipjoin use Clipboard; my $data = join '', Clipboard->paste; $data =~ s/\s+\|\s+//gm; $data =~ s/^\+//gm; $data =~ s/\n//gms; $data =~ s/\s{2,}/ /g; Clipboard->copy($data); print Clipboard->paste, "\n...is now in the Clipboard\n" unless $ARGV[0] eq '-q'; __END__ =pod =encoding UTF-8 =head1 NAME clipjoin - Remove superfluous spaces from the clipboard. =head1 VERSION version 0.32 =head1 MOTIVATION Often you'll copy some stuff, like this: hey rking, you should use YBFOD: http://search.cpan | .org/~ingy/Acme-YBFOD-0.11/ Getting that URL to a browser is tedious. Another IRC example is longer quotes: Objective consideration of contemporary phenomena compels the conclusion that success or failure in competitive activities exhibits no tendency to be commensurate with enate capacity but that a considerable element of the unpredictable must invariably be taken into account. I returned, and saw under the sun, that the race is not to the swift, nor the battle to the strong, neither yet bread to the wise, nor yet riches to men of understanding, nor yet favour to men of skill, but time and chance happeneth to them all. If you wanted to quote that to someone, you'd have \n's and " "'s everywhere, unless you ran "clipjoin" first. An example from mutt: ,-------------------------------------------. | xterm (X) | +-------------------------------------------+ | http://www.thisisalink.com/that/wrapped/ar| |+ound/a/line/and/its/a/pain/without/the/joi| |+inclip/script | `-------------------------------------------' Becomes: http://www.thisisalink.com/that/wrapped/around/a/line/and/its/a/pain/without/the/clipjoin/script =head1 AUTHOR Ryan King =head1 COPYRIGHT Copyright (c) 2010. Ryan King. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See L =for :stopwords cpan testmatrix url bugtracker rt cpants kwalitee diff irc mailto metadata placeholders metacpan =head1 SUPPORT =head2 Websites The following websites have more information about this module, and may be of help to you. As always, in addition to those websites please use your favorite search engine to discover more resources. =over 4 =item * MetaCPAN A modern, open-source CPAN search engine, useful to view POD in HTML format. L =item * RT: CPAN's Bug Tracker The RT ( Request Tracker ) website is the default bug/issue tracking system for CPAN. L =item * CPANTS The CPANTS is a website that analyzes the Kwalitee ( code metrics ) of a distribution. L =item * CPAN Testers The CPAN Testers is a network of smoke testers who run automated tests on uploaded CPAN distributions. L =item * CPAN Testers Matrix The CPAN Testers Matrix is a website that provides a visual overview of the test results for a distribution on various Perls/platforms. L =item * CPAN Testers Dependencies The CPAN Testers Dependencies is a website that shows a chart of the test results of all dependencies for a distribution. L =back =head2 Bugs / Feature Requests Please report any bugs or feature requests by email to C, or through the web interface at L. You will be automatically notified of any progress on the request by the system. =head2 Source Code The code is open to the world, and available for you to hack on. Please feel free to browse it and play with it, or whatever. If you want to contribute patches, please send me a diff or prod me to pull from your repository :) L git clone git://github.com/shlomif/Clipboard.git =head1 AUTHOR Shlomi Fish =head1 BUGS Please report any bugs or feature requests on the bugtracker website L When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature. =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2025 by Ryan King . This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut clipedit100755001750001750 1234014752333647 17153 0ustar00shlomifshlomif000000000000Clipboard-0.32/scripts#!/usr/bin/perl # PODNAME: clipedit use strict; use warnings; use Clipboard; use File::Temp qw( tempfile ); my $orig = Clipboard->paste; my ($tmp_fh, $tmpfilename) = tempfile(); print {$tmp_fh} $orig; close $tmp_fh; my $ed = $ENV{VISUAL} || $ENV{EDITOR} || 'vim'; system($ed, $tmpfilename); sub _slurp { my $filename = shift; open my $in, '<', $filename or die "Cannot open '$filename' for slurping - $!"; local $/; my $contents = <$in>; close($in); return $contents; } my $edited = _slurp($tmpfilename); my $current = Clipboard->paste; if ($current ne $orig) { local $| = 1; boldprint("1) When you started, the Clipboard contained:\n"); print $orig; boldprint("\n2) ...but now the Clipboard contains:\n"); print $current; boldprint("\n3) and you edited to this:\n"); print $edited; boldprint("\nWhich would you like to use (1, 2, or the default, 3)? "); my %actions = ( 1 => $orig, 2 => $current, 3 => $edited, ); my $answer; while (1) { $answer = ; chomp $answer; $answer = 3 if $answer eq ''; last if exists $actions{$answer}; my @puzzles = qw(hrm what huh uhh who because sneevle); boldprint(ucfirst($puzzles[int rand $#puzzles]) . "? "); } $edited = $actions{$answer}; } Clipboard->copy($edited); print Clipboard->paste; boldprint("\n...is now in the Clipboard\n"); unlink($tmpfilename) or die "Couldn't remove $tmpfilename: $!"; sub boldprint { # If you are in a situation where this output is annoying, such as in a # DOS console without ANSI parsing, please send a patch. For now, I'll # just do the simplest thing and print it every time: printf "\e[033m%s\e[0m", shift; } __END__ =pod =encoding UTF-8 =head1 NAME clipedit - Edit clipboard contents in one swoop. =head1 VERSION version 0.32 =head1 MOTIVATION Eliminating the "Open editor, edit stuff, copy back to the clipboard" shuffle. =head1 NOTE If for some reason the clipboard contents changes during the edit session, you will be prompted to choose between 1) the original Clipboard contents, 2) the new Clipboard contents, and 3) the result of your edits (which is the default if you just hit "Enter"). =head1 CONFIGURATION If you don't want the script to use C to edit, set either the environment variable C<$VISUAL> or C<$EDITOR>. =head1 AUTHOR Ryan King =head1 COPYRIGHT Copyright (c) 2010. Ryan King. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See L =for :stopwords cpan testmatrix url bugtracker rt cpants kwalitee diff irc mailto metadata placeholders metacpan =head1 SUPPORT =head2 Websites The following websites have more information about this module, and may be of help to you. As always, in addition to those websites please use your favorite search engine to discover more resources. =over 4 =item * MetaCPAN A modern, open-source CPAN search engine, useful to view POD in HTML format. L =item * RT: CPAN's Bug Tracker The RT ( Request Tracker ) website is the default bug/issue tracking system for CPAN. L =item * CPANTS The CPANTS is a website that analyzes the Kwalitee ( code metrics ) of a distribution. L =item * CPAN Testers The CPAN Testers is a network of smoke testers who run automated tests on uploaded CPAN distributions. L =item * CPAN Testers Matrix The CPAN Testers Matrix is a website that provides a visual overview of the test results for a distribution on various Perls/platforms. L =item * CPAN Testers Dependencies The CPAN Testers Dependencies is a website that shows a chart of the test results of all dependencies for a distribution. L =back =head2 Bugs / Feature Requests Please report any bugs or feature requests by email to C, or through the web interface at L. You will be automatically notified of any progress on the request by the system. =head2 Source Code The code is open to the world, and available for you to hack on. Please feel free to browse it and play with it, or whatever. If you want to contribute patches, please send me a diff or prod me to pull from your repository :) L git clone git://github.com/shlomif/Clipboard.git =head1 AUTHOR Shlomi Fish =head1 BUGS Please report any bugs or feature requests on the bugtracker website L When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature. =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2025 by Ryan King . This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut clipfilter-test100755001750001750 43114752333647 17343 0ustar00shlomifshlomif000000000000Clipboard-0.32/at#!/bin/sh -x reset_data() { cat scripts/clip* | perl -Ilib -MClipboard -e 'Clipboard->copy(join "", <>)' } reset_data perl -Ilib scripts/clipfilter -html # TODO: | tail <--buggy reset_data perl -Ilib scripts/clipfilter -uri reset_data perl -Ilib scripts/clipfilter tac clipbrowse-test100755001750001750 71214752333647 17361 0ustar00shlomifshlomif000000000000Clipboard-0.32/at#!/bin/sh PATH="scripts:$PATH" pcbe='perl -Ilib -MClipboard -e' cb='perl -Ilib scripts/clipbrowse' # BROWSER="firefox -remote \"openURL(%s,new-tab)\"" echo "# \$BROWSER == '$BROWSER'" echo "# Using $cb" $pcbe 'print qq[# and $INC{"Clipboard.pm"}\n]' check() { echo -n Checking "$1" $pcbe 'Clipboard->copy($ARGV[0])' "$1" || exit 1 $cb || exit 1 echo ' ok' } check 'http://cpan.org' check cpan check "'" check '"' check '()*&#(*&$;$$!!!#$@#' clipfilter100755001750001750 1154514752333647 17521 0ustar00shlomifshlomif000000000000Clipboard-0.32/scripts#!/usr/bin/perl # PODNAME: clipfilter use strict; use warnings; use Clipboard; my %methods = ( -html => sub { require CGI; CGI::escapeHTML($_[0]) }, -uri => sub { require URI::Escape; URI::Escape::uri_escape($_[0]) }, ); my $result = filter($ARGV[0], Clipboard->paste); Clipboard->copy($result); print $result, "\n... is now in the clipboard.\n"; sub filter { my ($method, $data) = @_; if (exists $methods{$method}) { return $methods{$method}->($data); } else { require IPC::Open2; my ($child_out, $child_in); my $cmd_text = join ' ', @ARGV; # just for error message output my $pid = IPC::Open2::open2($child_out, $child_in, @ARGV) or die "Couldn't open pipe to `$cmd_text`: $!"; print {$child_in} $data or die "Couldn't write to `$cmd_text`: $?"; close $child_in or die "Couldn't close 'in' for `$cmd_text`: $?"; my $ret = join '', <$child_out>; # Hrmm... error handling? close $child_out or die "Couldn't close 'out' for `$cmd_text`: $?"; waitpid($pid, 0); die "Child error for `$cmd_text`: $?" if $? >> 8; return $ret; } } __END__ =pod =encoding UTF-8 =head1 NAME clipfilter - Run various conversions for your clipboard data. =head1 VERSION version 0.32 =head1 USAGE # (copy some stuff) $ clipfilter -html # (paste, with html entities substituted in) # or URI-escaping: $ clipfilter -uri # or pipe through an arbitrary program, like `tac`, the backwards cat: $ clipfilter tac # Note: currently, this just dumps everything to open2() and reads # everything back. It could possibly create a deadlock, but I haven't # found the case that causes this, yet. =head1 MOTIVATION A very frequent user pattern is to copy something, edit it in some rote way, and then paste it back. Writing your own filter scripts will make it even more useful. =head1 BUGS Current weirdness when piping this to some programs, like 'wc' and 'tail'. I will work on this. =head1 AUTHOR Ryan King =head1 COPYRIGHT Copyright (c) 2010. Ryan King. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See L =for :stopwords cpan testmatrix url bugtracker rt cpants kwalitee diff irc mailto metadata placeholders metacpan =head1 SUPPORT =head2 Websites The following websites have more information about this module, and may be of help to you. As always, in addition to those websites please use your favorite search engine to discover more resources. =over 4 =item * MetaCPAN A modern, open-source CPAN search engine, useful to view POD in HTML format. L =item * RT: CPAN's Bug Tracker The RT ( Request Tracker ) website is the default bug/issue tracking system for CPAN. L =item * CPANTS The CPANTS is a website that analyzes the Kwalitee ( code metrics ) of a distribution. L =item * CPAN Testers The CPAN Testers is a network of smoke testers who run automated tests on uploaded CPAN distributions. L =item * CPAN Testers Matrix The CPAN Testers Matrix is a website that provides a visual overview of the test results for a distribution on various Perls/platforms. L =item * CPAN Testers Dependencies The CPAN Testers Dependencies is a website that shows a chart of the test results of all dependencies for a distribution. L =back =head2 Bugs / Feature Requests Please report any bugs or feature requests by email to C, or through the web interface at L. You will be automatically notified of any progress on the request by the system. =head2 Source Code The code is open to the world, and available for you to hack on. Please feel free to browse it and play with it, or whatever. If you want to contribute patches, please send me a diff or prod me to pull from your repository :) L git clone git://github.com/shlomif/Clipboard.git =head1 AUTHOR Shlomi Fish =head1 BUGS Please report any bugs or feature requests on the bugtracker website L When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature. =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2025 by Ryan King . This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut clipbrowse100755001750001750 1062614752333647 17534 0ustar00shlomifshlomif000000000000Clipboard-0.32/scripts#!/usr/bin/perl # PODNAME: clipbrowse use strict; use warnings; use Clipboard; my $browser = $ENV{BROWSER} || 'chromium-browser "%s"'; $browser .= ' "%s"' unless $browser =~ /%s/; my $query = Clipboard->paste; $query =~ s/['"]/\\$&/; system(sprintf $browser, $query); __END__ =pod =encoding UTF-8 =head1 NAME clipbrowse - Load a URL from the clipboard into your browser. =head1 VERSION version 0.32 =head1 USAGE # ...copy something # (You might want to do a `clipjoin` if the URL text is messy) $ clipbrowse Remember that many browsers will usefully load things that don't look like URL's. For example Firefox does a Google "I'm feeling lucky" with non-URLs. This means you can have any text in your clipboard and `clipbrowse`. =head1 MOTIVATION It saves a couple of seconds every time you run it. Chrome and Firefox, for examples, automatically create a new tab and loads the page when you invoke it from the command line. Already we've saved a Ctrl+T and a Shift+Insert. When you consider the parallelizing (that your browser will be actively loading the page while you're Alt+Tabbing to it), you've squeaked out a little more. Maybe I'm just a freak, but I like shaving out wasted time like that. =head1 CONFIGURATION The environment variable C<$BROWSER> will override the default launching command. If you have a %s in the line, it will be replaced with the url. if not, the url will be appended at the end. The default is `chromium-browser "%s"` (Debian's Google Chrome) If you still use Firefox, consider: `firefox -remote "openURL(%s,new-tab)"'`. =head1 AUTHOR Ryan King =head1 COPYRIGHT Copyright (c) 2010. Ryan King. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See L =for :stopwords cpan testmatrix url bugtracker rt cpants kwalitee diff irc mailto metadata placeholders metacpan =head1 SUPPORT =head2 Websites The following websites have more information about this module, and may be of help to you. As always, in addition to those websites please use your favorite search engine to discover more resources. =over 4 =item * MetaCPAN A modern, open-source CPAN search engine, useful to view POD in HTML format. L =item * RT: CPAN's Bug Tracker The RT ( Request Tracker ) website is the default bug/issue tracking system for CPAN. L =item * CPANTS The CPANTS is a website that analyzes the Kwalitee ( code metrics ) of a distribution. L =item * CPAN Testers The CPAN Testers is a network of smoke testers who run automated tests on uploaded CPAN distributions. L =item * CPAN Testers Matrix The CPAN Testers Matrix is a website that provides a visual overview of the test results for a distribution on various Perls/platforms. L =item * CPAN Testers Dependencies The CPAN Testers Dependencies is a website that shows a chart of the test results of all dependencies for a distribution. L =back =head2 Bugs / Feature Requests Please report any bugs or feature requests by email to C, or through the web interface at L. You will be automatically notified of any progress on the request by the system. =head2 Source Code The code is open to the world, and available for you to hack on. Please feel free to browse it and play with it, or whatever. If you want to contribute patches, please send me a diff or prod me to pull from your repository :) L git clone git://github.com/shlomif/Clipboard.git =head1 AUTHOR Shlomi Fish =head1 BUGS Please report any bugs or feature requests on the bugtracker website L When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature. =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2025 by Ryan King . This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut no-tabs.t100644001750001750 115614752333647 17411 0ustar00shlomifshlomif000000000000Clipboard-0.32/xt/authoruse strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::NoTabs 0.15 use Test::More 0.88; use Test::NoTabs; my @files = ( 'lib/Clipboard.pm', 'lib/Clipboard/MacPasteboard.pm', 'lib/Clipboard/WaylandClipboard.pm', 'lib/Clipboard/Win32.pm', 'lib/Clipboard/Xclip.pm', 'lib/Clipboard/Xsel.pm', 'scripts/clipaccumulate', 'scripts/clipbrowse', 'scripts/clipedit', 'scripts/clipfilter', 'scripts/clipjoin', 't/drivers.t', 't/lib/Test/Clipboard.pm', 't/lib/Test/MockClipboard.pm', 't/mock.t' ); notabs_ok($_) foreach @files; done_testing; Clipboard000755001750001750 014752333647 16226 5ustar00shlomifshlomif000000000000Clipboard-0.32/libXsel.pm100644001750001750 1106014752333647 17655 0ustar00shlomifshlomif000000000000Clipboard-0.32/lib/Clipboardpackage Clipboard::Xsel; $Clipboard::Xsel::VERSION = '0.32'; use strict; use warnings; use File::Spec (); sub copy { my $self = shift; my ($input) = @_; return $self->copy_to_selection($self->favorite_selection, $input); } sub copy_to_all_selections { my $self = shift; my ($input) = @_; foreach my $sel ($self->all_selections) { $self->copy_to_selection($sel, $input); } return; } sub copy_to_selection { my $self = shift; my ($selection, $input) = @_; my $cmd = '|xsel -i --'. $selection; my $r = open my $exe, $cmd or die "Couldn't run `$cmd`: $!\n"; binmode $exe, ':encoding(UTF-8)'; print {$exe} $input; close $exe or die "Error closing `$cmd`: $!"; return; } sub paste { my $self = shift; for ($self->all_selections) { my $data = $self->paste_from_selection($_); return $data if length $data; } return undef; } sub paste_from_selection { my $self = shift; my ($selection) = @_; my $cmd = "xsel -o --$selection|"; open my $exe, $cmd or die "Couldn't run `$cmd`: $!\n"; my $result = do { local $/; <$exe> }; close $exe or die "Error closing `$cmd`: $!"; return $result; } # This ordering isn't officially verified, but so far seems to work the best: sub all_selections { qw(primary buffer clipboard secondary) } sub favorite_selection { my $self = shift; ($self->all_selections)[0] } sub xsel_available { # close STDERR open my $olderr, '>&', \*STDERR; close STDERR; open STDERR, '>', File::Spec->devnull; my $open_retval = open my $just_checking, 'xsel -o|'; # restore STDERR close STDERR; open STDERR, '>&', $olderr; close $olderr; return $open_retval; } { xsel_available() or warn <<'EPIGRAPH'; Can't find the 'xsel' program. Clipboard.pm's X support depends on it. Here's the project homepage: https://vergenet.net/~conrad/software/xsel/ EPIGRAPH } 1; __END__ =pod =encoding UTF-8 =head1 VERSION version 0.32 =for :stopwords cpan testmatrix url bugtracker rt cpants kwalitee diff irc mailto metadata placeholders metacpan =head1 SUPPORT =head2 Websites The following websites have more information about this module, and may be of help to you. As always, in addition to those websites please use your favorite search engine to discover more resources. =over 4 =item * MetaCPAN A modern, open-source CPAN search engine, useful to view POD in HTML format. L =item * RT: CPAN's Bug Tracker The RT ( Request Tracker ) website is the default bug/issue tracking system for CPAN. L =item * CPANTS The CPANTS is a website that analyzes the Kwalitee ( code metrics ) of a distribution. L =item * CPAN Testers The CPAN Testers is a network of smoke testers who run automated tests on uploaded CPAN distributions. L =item * CPAN Testers Matrix The CPAN Testers Matrix is a website that provides a visual overview of the test results for a distribution on various Perls/platforms. L =item * CPAN Testers Dependencies The CPAN Testers Dependencies is a website that shows a chart of the test results of all dependencies for a distribution. L =back =head2 Bugs / Feature Requests Please report any bugs or feature requests by email to C, or through the web interface at L. You will be automatically notified of any progress on the request by the system. =head2 Source Code The code is open to the world, and available for you to hack on. Please feel free to browse it and play with it, or whatever. If you want to contribute patches, please send me a diff or prod me to pull from your repository :) L git clone git://github.com/shlomif/Clipboard.git =head1 AUTHOR Shlomi Fish =head1 BUGS Please report any bugs or feature requests on the bugtracker website L When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature. =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2025 by Ryan King . This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut Win32.pm100644001750001750 564214752333647 17635 0ustar00shlomifshlomif000000000000Clipboard-0.32/lib/Clipboardpackage Clipboard::Win32; $Clipboard::Win32::VERSION = '0.32'; use strict; use warnings; use Win32::Clipboard; our $board = Win32::Clipboard(); sub copy { my $self = shift; $board->Set($_[0]); } sub paste { my $self = shift; return $board->Get(); } 1; __END__ =pod =encoding UTF-8 =head1 VERSION version 0.32 =for :stopwords cpan testmatrix url bugtracker rt cpants kwalitee diff irc mailto metadata placeholders metacpan =head1 SUPPORT =head2 Websites The following websites have more information about this module, and may be of help to you. As always, in addition to those websites please use your favorite search engine to discover more resources. =over 4 =item * MetaCPAN A modern, open-source CPAN search engine, useful to view POD in HTML format. L =item * RT: CPAN's Bug Tracker The RT ( Request Tracker ) website is the default bug/issue tracking system for CPAN. L =item * CPANTS The CPANTS is a website that analyzes the Kwalitee ( code metrics ) of a distribution. L =item * CPAN Testers The CPAN Testers is a network of smoke testers who run automated tests on uploaded CPAN distributions. L =item * CPAN Testers Matrix The CPAN Testers Matrix is a website that provides a visual overview of the test results for a distribution on various Perls/platforms. L =item * CPAN Testers Dependencies The CPAN Testers Dependencies is a website that shows a chart of the test results of all dependencies for a distribution. L =back =head2 Bugs / Feature Requests Please report any bugs or feature requests by email to C, or through the web interface at L. You will be automatically notified of any progress on the request by the system. =head2 Source Code The code is open to the world, and available for you to hack on. Please feel free to browse it and play with it, or whatever. If you want to contribute patches, please send me a diff or prod me to pull from your repository :) L git clone git://github.com/shlomif/Clipboard.git =head1 AUTHOR Shlomi Fish =head1 BUGS Please report any bugs or feature requests on the bugtracker website L When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature. =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2025 by Ryan King . This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut Xclip.pm100644001750001750 1110514752333647 20021 0ustar00shlomifshlomif000000000000Clipboard-0.32/lib/Clipboardpackage Clipboard::Xclip; $Clipboard::Xclip::VERSION = '0.32'; use strict; use warnings; use File::Spec (); sub copy { my $self = shift; my ($input) = @_; return $self->copy_to_selection($self->favorite_selection, $input); } sub copy_to_all_selections { my $self = shift; my ($input) = @_; foreach my $sel ($self->all_selections) { $self->copy_to_selection($sel, $input); } return; } sub copy_to_selection { my $self = shift; my ($selection, $input) = @_; my $cmd = '|xclip -i -selection '. $selection; my $r = open my $exe, $cmd or die "Couldn't run `$cmd`: $!\n"; binmode $exe, ':encoding(UTF-8)'; print {$exe} $input; close $exe or die "Error closing `$cmd`: $!"; return; } sub paste { my $self = shift; for ($self->all_selections) { my $data = $self->paste_from_selection($_); return $data if length $data; } return undef; } sub paste_from_selection { my $self = shift; my ($selection) = @_; my $cmd = "xclip -o -selection $selection|"; open my $exe, $cmd or die "Couldn't run `$cmd`: $!\n"; my $result = do { local $/; <$exe> }; close $exe or die "Error closing `$cmd`: $!"; return $result; } # This ordering isn't officially verified, but so far seems to work the best: sub all_selections { qw(primary buffer clipboard secondary) } sub favorite_selection { my $self = shift; ($self->all_selections)[0] } sub xclip_available { # close STDERR open my $olderr, '>&', \*STDERR; close STDERR; open STDERR, '>', File::Spec->devnull; my $open_retval = open my $just_checking, 'xclip -o|'; # restore STDERR close STDERR; open STDERR, '>&', $olderr; close $olderr; return $open_retval; } { xclip_available() or warn <<'EPIGRAPH'; Can't find the 'xclip' program. Clipboard.pm's X support depends on it. Here's the project homepage: http://sourceforge.net/projects/xclip/ EPIGRAPH } 1; __END__ =pod =encoding UTF-8 =head1 VERSION version 0.32 =for :stopwords cpan testmatrix url bugtracker rt cpants kwalitee diff irc mailto metadata placeholders metacpan =head1 SUPPORT =head2 Websites The following websites have more information about this module, and may be of help to you. As always, in addition to those websites please use your favorite search engine to discover more resources. =over 4 =item * MetaCPAN A modern, open-source CPAN search engine, useful to view POD in HTML format. L =item * RT: CPAN's Bug Tracker The RT ( Request Tracker ) website is the default bug/issue tracking system for CPAN. L =item * CPANTS The CPANTS is a website that analyzes the Kwalitee ( code metrics ) of a distribution. L =item * CPAN Testers The CPAN Testers is a network of smoke testers who run automated tests on uploaded CPAN distributions. L =item * CPAN Testers Matrix The CPAN Testers Matrix is a website that provides a visual overview of the test results for a distribution on various Perls/platforms. L =item * CPAN Testers Dependencies The CPAN Testers Dependencies is a website that shows a chart of the test results of all dependencies for a distribution. L =back =head2 Bugs / Feature Requests Please report any bugs or feature requests by email to C, or through the web interface at L. You will be automatically notified of any progress on the request by the system. =head2 Source Code The code is open to the world, and available for you to hack on. Please feel free to browse it and play with it, or whatever. If you want to contribute patches, please send me a diff or prod me to pull from your repository :) L git clone git://github.com/shlomif/Clipboard.git =head1 AUTHOR Shlomi Fish =head1 BUGS Please report any bugs or feature requests on the bugtracker website L When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature. =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2025 by Ryan King . This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut clipaccumulate100755001750001750 1075614752333647 20362 0ustar00shlomifshlomif000000000000Clipboard-0.32/scripts#!/usr/bin/perl # PODNAME: clipaccumulate use strict; use warnings; use Clipboard; my $END_STRING = 'endEndENDenDend'; my $should_quit = 0; my $prev = Clipboard->paste; my $total = ''; warn "To exit, hit ^C, or copy this string into the clipboard: $END_STRING\n"; $SIG{INT} = sub { $should_quit = 1 }; while (1) { my $cur = Clipboard->paste; $should_quit = 1 if $cur eq $END_STRING; last if $should_quit; if ($prev ne $cur) { print $cur, ' '; $total .= $cur . ' '; } $prev = $cur; } END { Clipboard->copy($total); print "\nClipboard accumulated.\n"; } __END__ =pod =encoding UTF-8 =head1 NAME clipaccumulate - Make a bunch of little clipboards into one big one. =head1 VERSION version 0.32 =head1 USAGE The first thing it says (which goes to STDERR, so you can redirect into a file if you want), is how to exit, which is by copying the magic "end" string into the clipboard. Crufty? Yep. You can still do Ctrl+C if you don't like this (or if the string scrolls off the top of the screen). The next thing it does is wait for the clipboard to change, at which point it will print out the new data and go back to waiting for the clipboard to change. Then you copy the exit string, and it will fill the clipboard with all the little pieces it saw along the way. (Right now, it just joins everything with spaces in between - is this bugging anyone?) =head1 MOTIVATION Hard to explain. I run into cases where I wanted to make a bunch of small notes that included all these different bits of info. Instead of jotting them down on a scrap of paper, I made this. Let me know how it can be made better. =head1 AUTHOR Ryan King =head1 COPYRIGHT Copyright (c) 2010. Ryan King. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See L =for :stopwords cpan testmatrix url bugtracker rt cpants kwalitee diff irc mailto metadata placeholders metacpan =head1 SUPPORT =head2 Websites The following websites have more information about this module, and may be of help to you. As always, in addition to those websites please use your favorite search engine to discover more resources. =over 4 =item * MetaCPAN A modern, open-source CPAN search engine, useful to view POD in HTML format. L =item * RT: CPAN's Bug Tracker The RT ( Request Tracker ) website is the default bug/issue tracking system for CPAN. L =item * CPANTS The CPANTS is a website that analyzes the Kwalitee ( code metrics ) of a distribution. L =item * CPAN Testers The CPAN Testers is a network of smoke testers who run automated tests on uploaded CPAN distributions. L =item * CPAN Testers Matrix The CPAN Testers Matrix is a website that provides a visual overview of the test results for a distribution on various Perls/platforms. L =item * CPAN Testers Dependencies The CPAN Testers Dependencies is a website that shows a chart of the test results of all dependencies for a distribution. L =back =head2 Bugs / Feature Requests Please report any bugs or feature requests by email to C, or through the web interface at L. You will be automatically notified of any progress on the request by the system. =head2 Source Code The code is open to the world, and available for you to hack on. Please feel free to browse it and play with it, or whatever. If you want to contribute patches, please send me a diff or prod me to pull from your repository :) L git clone git://github.com/shlomif/Clipboard.git =head1 AUTHOR Shlomi Fish =head1 BUGS Please report any bugs or feature requests on the bugtracker website L When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature. =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2025 by Ryan King . This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut pod-syntax.t100644001750001750 25214752333647 20130 0ustar00shlomifshlomif000000000000Clipboard-0.32/xt/author#!perl # This file was automatically generated by Dist::Zilla::Plugin::PodSyntaxTests. use strict; use warnings; use Test::More; use Test::Pod 1.41; all_pod_files_ok(); Test000755001750001750 014752333647 15511 5ustar00shlomifshlomif000000000000Clipboard-0.32/t/libClipboard.pm100644001750001750 12614752333647 20065 0ustar00shlomifshlomif000000000000Clipboard-0.32/t/lib/Testuse strict; use warnings; use Test::More 'no_plan'; use lib 'lib'; use Clipboard; 1; all-xclip-selections100755001750001750 73014752333647 20266 0ustar00shlomifshlomif000000000000Clipboard-0.32/at#!/usr/bin/perl # prove that Clipboard::Xclip will dig around through the selections until it # finds something. use strict; use warnings; use lib 'lib'; use Clipboard; use Test::More 'no_plan'; for (Clipboard::Xclip->all_selections) { my $str = "$_ paste worked\n\nwith double-newlines, even."; Clipboard::Xclip->copy_to_selection($_, $str); my $actual = Clipboard->paste; is $actual, $str, "$_ test"; Clipboard::Xclip->copy_to_selection($_, ''); } release000755001750001750 014752333647 15634 5ustar00shlomifshlomif000000000000Clipboard-0.32/xtcpan-changes.t100644001750001750 34414752333647 20471 0ustar00shlomifshlomif000000000000Clipboard-0.32/xt/releaseuse strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::CPAN::Changes 0.013 use Test::More 0.96 tests => 1; use Test::CPAN::Changes; subtest 'changes_ok' => sub { changes_file_ok('Changes'); }; MockClipboard.pm100644001750001750 25114752333647 20676 0ustar00shlomifshlomif000000000000Clipboard-0.32/t/lib/Testpackage PhonyClipboard; our $board = ''; sub copy { my $self = shift; $board = $_[0]; } sub paste { my $self = shift; $board } $Clipboard::driver = 'PhonyClipboard'; 1; trailing-space.t100644001750001750 107714752333647 21070 0ustar00shlomifshlomif000000000000Clipboard-0.32/xt/release#!perl use strict; use warnings; use Test::More; eval "use Test::TrailingSpace"; if ($@) { plan skip_all => "Test::TrailingSpace required for trailing space test."; } else { plan tests => 1; } # TODO: add .pod, .PL, the README/Changes/TODO/etc. documents and possibly # some other stuff. my $finder = Test::TrailingSpace->new( { root => '.', filename_regex => qr#(?:\.(?:t|pm|pl|xs|c|h|txt|pod|PL)|README|Changes|TODO|LICENSE)\z#, abs_path_prune_re => undef, }, ); # TEST $finder->no_trailing_space( "No trailing space was found." ); MacPasteboard.pm100644001750001750 577214752333647 21444 0ustar00shlomifshlomif000000000000Clipboard-0.32/lib/Clipboardpackage Clipboard::MacPasteboard; $Clipboard::MacPasteboard::VERSION = '0.32'; use strict; use warnings; use Mac::Pasteboard 0.011; our $board = Mac::Pasteboard->new(); $board->set( missing_ok => 1 ); sub copy { my $self = shift; $board->clear(); $board->copy($_[0]); } sub paste { my $self = shift; return scalar $board->paste(); } 1; __END__ =pod =encoding UTF-8 =head1 VERSION version 0.32 =for :stopwords cpan testmatrix url bugtracker rt cpants kwalitee diff irc mailto metadata placeholders metacpan =head1 SUPPORT =head2 Websites The following websites have more information about this module, and may be of help to you. As always, in addition to those websites please use your favorite search engine to discover more resources. =over 4 =item * MetaCPAN A modern, open-source CPAN search engine, useful to view POD in HTML format. L =item * RT: CPAN's Bug Tracker The RT ( Request Tracker ) website is the default bug/issue tracking system for CPAN. L =item * CPANTS The CPANTS is a website that analyzes the Kwalitee ( code metrics ) of a distribution. L =item * CPAN Testers The CPAN Testers is a network of smoke testers who run automated tests on uploaded CPAN distributions. L =item * CPAN Testers Matrix The CPAN Testers Matrix is a website that provides a visual overview of the test results for a distribution on various Perls/platforms. L =item * CPAN Testers Dependencies The CPAN Testers Dependencies is a website that shows a chart of the test results of all dependencies for a distribution. L =back =head2 Bugs / Feature Requests Please report any bugs or feature requests by email to C, or through the web interface at L. You will be automatically notified of any progress on the request by the system. =head2 Source Code The code is open to the world, and available for you to hack on. Please feel free to browse it and play with it, or whatever. If you want to contribute patches, please send me a diff or prod me to pull from your repository :) L git clone git://github.com/shlomif/Clipboard.git =head1 AUTHOR Shlomi Fish =head1 BUGS Please report any bugs or feature requests on the bugtracker website L When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature. =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2025 by Ryan King . This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut WaylandClipboard.pm100644001750001750 1161214752333647 22164 0ustar00shlomifshlomif000000000000Clipboard-0.32/lib/Clipboardpackage Clipboard::WaylandClipboard; $Clipboard::WaylandClipboard::VERSION = '0.32'; # First written 04/11/2024 by Lester Hightower (PAUSE ID hightowe) use strict; use warnings; use File::Spec (); sub copy { my $self = shift; my ($input) = @_; return $self->copy_to_selection($self->favorite_selection, $input); } sub copy_to_all_selections { my $self = shift; my ($input) = @_; foreach my $sel ($self->all_selections) { $self->copy_to_selection($sel, $input); } return; } sub copy_to_selection { my $self = shift; my ($selection, $input) = @_; my @cmd_parts = qw(| wl-copy); push(@cmd_parts, '--primary') if ($selection eq 'primary'); my $cmd = join(' ', @cmd_parts); my $r = open my $exe, $cmd or die "Couldn't run `$cmd`: $!\n"; binmode $exe, ':encoding(UTF-8)'; print {$exe} $input; close $exe or die "Error closing `$cmd`: $!"; return; } sub paste { my $self = shift; for ($self->all_selections) { my $data = $self->paste_from_selection($_); return $data if length $data; } return undef; } sub paste_from_selection { my $self = shift; my ($selection) = @_; my @cmd_parts = qw(wl-paste --no-newline); push(@cmd_parts, '--primary') if ($selection eq 'primary'); push(@cmd_parts, '|'); my $cmd = join(' ', @cmd_parts); open my $exe, $cmd or die "Couldn't run `$cmd`: $!\n"; my $result = do { local $/; <$exe> }; close $exe or die "Error closing `$cmd`: $!"; return $result; } # "regular" isn't directly used in this code (it is the wl-clipboard default) sub all_selections { qw( regular primary ) } sub favorite_selection { my $self = shift; ($self->all_selections)[0] } sub available { # close STDERR open my $olderr, '>&', \*STDERR; close STDERR; open STDERR, '>', File::Spec->devnull; my $open_retval = open my $just_checking, 'wl-copy --version |'; # restore STDERR close STDERR; open STDERR, '>&', $olderr; close $olderr; return $open_retval; } { available() or warn <<'EPIGRAPH'; Can't find the 'wl-copy' program from the wl‐clipboard package. Clipboard.pm's Wayland support depends on it. Here's the project homepage: https://github.com/bugaevc/wl-clipboard EPIGRAPH } 1; __END__ =pod =encoding UTF-8 =head1 VERSION version 0.32 =for :stopwords cpan testmatrix url bugtracker rt cpants kwalitee diff irc mailto metadata placeholders metacpan =head1 SUPPORT =head2 Websites The following websites have more information about this module, and may be of help to you. As always, in addition to those websites please use your favorite search engine to discover more resources. =over 4 =item * MetaCPAN A modern, open-source CPAN search engine, useful to view POD in HTML format. L =item * RT: CPAN's Bug Tracker The RT ( Request Tracker ) website is the default bug/issue tracking system for CPAN. L =item * CPANTS The CPANTS is a website that analyzes the Kwalitee ( code metrics ) of a distribution. L =item * CPAN Testers The CPAN Testers is a network of smoke testers who run automated tests on uploaded CPAN distributions. L =item * CPAN Testers Matrix The CPAN Testers Matrix is a website that provides a visual overview of the test results for a distribution on various Perls/platforms. L =item * CPAN Testers Dependencies The CPAN Testers Dependencies is a website that shows a chart of the test results of all dependencies for a distribution. L =back =head2 Bugs / Feature Requests Please report any bugs or feature requests by email to C, or through the web interface at L. You will be automatically notified of any progress on the request by the system. =head2 Source Code The code is open to the world, and available for you to hack on. Please feel free to browse it and play with it, or whatever. If you want to contribute patches, please send me a diff or prod me to pull from your repository :) L git clone git://github.com/shlomif/Clipboard.git =head1 AUTHOR Shlomi Fish =head1 BUGS Please report any bugs or feature requests on the bugtracker website L When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature. =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2025 by Ryan King . This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut