From 42084d6cbb6ad95e1cdd61f91e58f0eb42f028e5 Mon Sep 17 00:00:00 2001 From: Takuya Tsuchida Date: Mon, 8 May 2017 23:31:51 +0900 Subject: [PATCH] migrate to minilla --- .gitignore | 8 + .mailmap | 1 + .shipit | 3 - Build.PL | 12 + LICENSE | 378 ++++++++++++++++++ MANIFEST | 43 -- MANIFEST.SKIP | 12 - META.json | 77 ++++ Makefile | 825 +++++++++++++++++++++++++++++++++++++++ Makefile.PL | 28 -- README.md | 494 +++++++++++++++++++++++ cpanfile | 10 + lib/Test/Mock/Net/FTP.pm | 312 +++++++-------- xt/manifest.t | 7 - xt/module_used.t | 6 - xt/perlcritic.t | 7 - xt/perlcriticrc | 0 xt/pod.t | 4 - xt/pod_coverage.t | 4 - xt/synopsis.t | 2 - 20 files changed, 1963 insertions(+), 270 deletions(-) create mode 100644 .mailmap delete mode 100755 .shipit create mode 100644 Build.PL create mode 100644 LICENSE delete mode 100644 MANIFEST delete mode 100755 MANIFEST.SKIP create mode 100644 META.json create mode 100644 Makefile delete mode 100755 Makefile.PL create mode 100644 README.md create mode 100644 cpanfile delete mode 100644 xt/manifest.t delete mode 100755 xt/module_used.t delete mode 100755 xt/perlcritic.t delete mode 100644 xt/perlcriticrc delete mode 100755 xt/pod.t delete mode 100755 xt/pod_coverage.t delete mode 100755 xt/synopsis.t diff --git a/.gitignore b/.gitignore index c5aa511..79477aa 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,10 @@ *~ cover_db/ +/Test-Mock-Net-FTP-* +/.build +/_build_params +/Build +/Build.bat +!Build/ +!META.json +!LICENSE diff --git a/.mailmap b/.mailmap new file mode 100644 index 0000000..f74391c --- /dev/null +++ b/.mailmap @@ -0,0 +1 @@ +Takuya Tsuchida diff --git a/.shipit b/.shipit deleted file mode 100755 index facbfb6..0000000 --- a/.shipit +++ /dev/null @@ -1,3 +0,0 @@ -steps = FindVersion, ChangeVersion, CheckChangeLog, DistTest, Commit, Tag, MakeDist, UploadCPAN -git.tagpattern = version-%v -git.push_to = origin diff --git a/Build.PL b/Build.PL new file mode 100644 index 0000000..16855c4 --- /dev/null +++ b/Build.PL @@ -0,0 +1,12 @@ +# ========================================================================= +# THIS FILE IS AUTOMATICALLY GENERATED BY MINILLA. +# DO NOT EDIT DIRECTLY. +# ========================================================================= + +use 5.008_001; +use strict; + +use Module::Build::Tiny 0.035; + +Build_PL(); + diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..38af1dd --- /dev/null +++ b/LICENSE @@ -0,0 +1,378 @@ +This software is copyright (c) 2013 by Takuya Tsuchida . + +This is free software; you can redistribute it and/or modify it under +the same terms as the Perl 5 programming language system itself. + +Terms of the Perl programming language system itself + +a) the GNU General Public License as published by the Free + Software Foundation; either version 1, or (at your option) any + later version, or +b) the "Artistic License" + +--- The GNU General Public License, Version 1, February 1989 --- + +This software is Copyright (c) 2013 by Takuya Tsuchida . + +This is free software, licensed under: + + The GNU General Public License, Version 1, February 1989 + + GNU GENERAL PUBLIC LICENSE + Version 1, February 1989 + + Copyright (C) 1989 Free Software Foundation, Inc. + 51 Franklin St, Suite 500, Boston, MA 02110-1335 USA + + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The license agreements of most software companies try to keep users +at the mercy of those companies. By contrast, our General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. The +General Public License applies to the Free Software Foundation's +software and to any other program whose authors commit to using it. +You can use it for your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Specifically, the General Public License is designed to make +sure that you have the freedom to give away or sell copies of free +software, that you receive source code or can get it if you want it, +that you can change the software or use pieces of it in new free +programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of a such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must tell them their rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any program or other work which +contains a notice placed by the copyright holder saying it may be +distributed under the terms of this General Public License. The +"Program", below, refers to any such program or work, and a "work based +on the Program" means either the Program or any work containing the +Program or a portion of it, either verbatim or with modifications. Each +licensee is addressed as "you". + + 1. You may copy and distribute verbatim copies of the Program's source +code as you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer to this +General Public License and to the absence of any warranty; and give any +other recipients of the Program a copy of this General Public License +along with the Program. You may charge a fee for the physical act of +transferring a copy. + + 2. You may modify your copy or copies of the Program or any portion of +it, and copy and distribute such modifications under the terms of Paragraph +1 above, provided that you also do the following: + + a) cause the modified files to carry prominent notices stating that + you changed the files and the date of any change; and + + b) cause the whole of any work that you distribute or publish, that + in whole or in part contains the Program or any part thereof, either + with or without modifications, to be licensed at no charge to all + third parties under the terms of this General Public License (except + that you may choose to grant warranty protection to some or all + third parties, at your option). + + c) If the modified program normally reads commands interactively when + run, you must cause it, when started running for such interactive use + in the simplest and most usual way, to print or display an + announcement including an appropriate copyright notice and a notice + that there is no warranty (or else, saying that you provide a + warranty) and that users may redistribute the program under these + conditions, and telling the user how to view a copy of this General + Public License. + + d) You may charge a fee for the physical act of transferring a + copy, and you may at your option offer warranty protection in + exchange for a fee. + +Mere aggregation of another independent work with the Program (or its +derivative) on a volume of a storage or distribution medium does not bring +the other work under the scope of these terms. + + 3. You may copy and distribute the Program (or a portion or derivative of +it, under Paragraph 2) in object code or executable form under the terms of +Paragraphs 1 and 2 above provided that you also do one of the following: + + a) accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of + Paragraphs 1 and 2 above; or, + + b) accompany it with a written offer, valid for at least three + years, to give any third party free (except for a nominal charge + for the cost of distribution) a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of + Paragraphs 1 and 2 above; or, + + c) accompany it with the information you received as to where the + corresponding source code may be obtained. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form alone.) + +Source code for a work means the preferred form of the work for making +modifications to it. For an executable file, complete source code means +all the source code for all modules it contains; but, as a special +exception, it need not include source code for modules which are standard +libraries that accompany the operating system on which the executable +file runs, or for standard header files or definitions files that +accompany that operating system. + + 4. You may not copy, modify, sublicense, distribute or transfer the +Program except as expressly provided under this General Public License. +Any attempt otherwise to copy, modify, sublicense, distribute or transfer +the Program is void, and will automatically terminate your rights to use +the Program under this License. However, parties who have received +copies, or rights to use copies, from you under this General Public +License will not have their licenses terminated so long as such parties +remain in full compliance. + + 5. By copying, distributing or modifying the Program (or any work based +on the Program) you indicate your acceptance of this license to do so, +and all its terms and conditions. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the original +licensor to copy, distribute or modify the Program subject to these +terms and conditions. You may not impose any further restrictions on the +recipients' exercise of the rights granted herein. + + 7. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of the license which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +the license, you may choose any version ever published by the Free Software +Foundation. + + 8. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + Appendix: How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to humanity, the best way to achieve this is to make it +free software which everyone can redistribute and change under these +terms. + + To do so, attach the following notices to the program. It is safest to +attach them to the start of each source file to most effectively convey +the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) 19yy + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 1, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) 19xx name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the +appropriate parts of the General Public License. Of course, the +commands you use may be called something other than `show w' and `show +c'; they could even be mouse-clicks or menu items--whatever suits your +program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + program `Gnomovision' (a program to direct compilers to make passes + at assemblers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +That's all there is to it! + + +--- The Artistic License 1.0 --- + +This software is Copyright (c) 2013 by Takuya Tsuchida . + +This is free software, licensed under: + + The Artistic License 1.0 + +The Artistic License + +Preamble + +The intent of this document is to state the conditions under which a Package +may be copied, such that the Copyright Holder maintains some semblance of +artistic control over the development of the package, while giving the users of +the package the right to use and distribute the Package in a more-or-less +customary fashion, plus the right to make reasonable modifications. + +Definitions: + + - "Package" refers to the collection of files distributed by the Copyright + Holder, and derivatives of that collection of files created through + textual modification. + - "Standard Version" refers to such a Package if it has not been modified, + or has been modified in accordance with the wishes of the Copyright + Holder. + - "Copyright Holder" is whoever is named in the copyright or copyrights for + the package. + - "You" is you, if you're thinking about copying or distributing this Package. + - "Reasonable copying fee" is whatever you can justify on the basis of media + cost, duplication charges, time of people involved, and so on. (You will + not be required to justify it to the Copyright Holder, but only to the + computing community at large as a market that must bear the fee.) + - "Freely Available" means that no fee is charged for the item itself, though + there may be fees involved in handling the item. It also means that + recipients of the item may redistribute it under the same conditions they + received it. + +1. You may make and give away verbatim copies of the source form of the +Standard Version of this Package without restriction, provided that you +duplicate all of the original copyright notices and associated disclaimers. + +2. You may apply bug fixes, portability fixes and other modifications derived +from the Public Domain or from the Copyright Holder. A Package modified in such +a way shall still be considered the Standard Version. + +3. You may otherwise modify your copy of this Package in any way, provided that +you insert a prominent notice in each changed file stating how and when you +changed that file, and provided that you do at least ONE of the following: + + a) place your modifications in the Public Domain or otherwise make them + Freely Available, such as by posting said modifications to Usenet or an + equivalent medium, or placing the modifications on a major archive site + such as ftp.uu.net, or by allowing the Copyright Holder to include your + modifications in the Standard Version of the Package. + + b) use the modified Package only within your corporation or organization. + + c) rename any non-standard executables so the names do not conflict with + standard executables, which must also be provided, and provide a separate + manual page for each non-standard executable that clearly documents how it + differs from the Standard Version. + + d) make other distribution arrangements with the Copyright Holder. + +4. You may distribute the programs of this Package in object code or executable +form, provided that you do at least ONE of the following: + + a) distribute a Standard Version of the executables and library files, + together with instructions (in the manual page or equivalent) on where to + get the Standard Version. + + b) accompany the distribution with the machine-readable source of the Package + with your modifications. + + c) accompany any non-standard executables with their corresponding Standard + Version executables, giving the non-standard executables non-standard + names, and clearly documenting the differences in manual pages (or + equivalent), together with instructions on where to get the Standard + Version. + + d) make other distribution arrangements with the Copyright Holder. + +5. You may charge a reasonable copying fee for any distribution of this +Package. You may charge any fee you choose for support of this Package. You +may not charge a fee for this Package itself. However, you may distribute this +Package in aggregate with other (possibly commercial) programs as part of a +larger (possibly commercial) software distribution provided that you do not +advertise this Package as a product of your own. + +6. The scripts and library files supplied as input to or produced as output +from the programs of this Package do not automatically fall under the copyright +of this Package, but belong to whomever generated them, and may be sold +commercially, and may be aggregated with this Package. + +7. C or perl subroutines supplied by you and linked into this Package shall not +be considered part of this Package. + +8. The name of the Copyright Holder may not be used to endorse or promote +products derived from this software without specific prior written permission. + +9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF +MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. + +The End diff --git a/MANIFEST b/MANIFEST deleted file mode 100644 index d58315b..0000000 --- a/MANIFEST +++ /dev/null @@ -1,43 +0,0 @@ -Changes -inc/Module/Install.pm -inc/Module/Install/AuthorRequires.pm -inc/Module/Install/AuthorTests.pm -inc/Module/Install/Base.pm -inc/Module/Install/Can.pm -inc/Module/Install/Fetch.pm -inc/Module/Install/Makefile.pm -inc/Module/Install/Metadata.pm -inc/Module/Install/Win32.pm -inc/Module/Install/WriteAll.pm -lib/Test/Mock/Net/FTP.pm -Makefile.PL -MANIFEST This list of files -META.yml -t/001_use_ok.t -t/002_login.t -t/003_cwd.t -t/004_put.t -t/005_get.t -t/006_intercept_put.t -t/007_intercept_get.t -t/008_override.t -t/009_ls.t -t/010_dir.t -t/011_misc_methods.t -t/012_rename.t -t/013_delete.t -t/014_mkdir_and_rmdir.t -t/015_append.t -t/016_clear_message.t -t/017_command_history.t -t/018_default_implementation.t -t/perlcriticrc -t/testdata/data1.txt -t/Util.pm -xt/manifest.t -xt/module_used.t -xt/perlcritic.t -xt/perlcriticrc -xt/pod.t -xt/pod_coverage.t -xt/synopsis.t diff --git a/MANIFEST.SKIP b/MANIFEST.SKIP deleted file mode 100755 index bb0e60a..0000000 --- a/MANIFEST.SKIP +++ /dev/null @@ -1,12 +0,0 @@ -^Makefile$ -^MANIFEST.SKIP$ -^MANIFEST.bak$ -.*~$ -.svn -^.git/ -^.gitignore$ -^TODO$ -^a.pl$ -^cover_db/ -^.shipit$ -^MYMETA.yml$ \ No newline at end of file diff --git a/META.json b/META.json new file mode 100644 index 0000000..582f08a --- /dev/null +++ b/META.json @@ -0,0 +1,77 @@ +{ + "abstract" : "Mock Object for Net::FTP", + "author" : [ + "Takuya Tsuchida " + ], + "dynamic_config" : 0, + "generated_by" : "Minilla/v3.0.10, CPAN::Meta::Converter version 2.150005", + "license" : [ + "perl_5" + ], + "meta-spec" : { + "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", + "version" : "2" + }, + "name" : "Test-Mock-Net-FTP", + "no_index" : { + "directory" : [ + "t", + "xt", + "inc", + "share", + "eg", + "examples", + "author", + "builder" + ] + }, + "prereqs" : { + "build" : { + "requires" : { + "Capture::Tiny" : "0", + "ExtUtils::MakeMaker" : "6.59", + "Test::More" : "0.94", + "parent" : "0" + } + }, + "configure" : { + "requires" : { + "Module::Build::Tiny" : "0.035" + } + }, + "develop" : { + "requires" : { + "Test::CPAN::Meta" : "0", + "Test::MinimumVersion::Fast" : "0.04", + "Test::PAUSE::Permissions" : "0.04", + "Test::Pod" : "1.41", + "Test::Spellunker" : "v0.2.7" + } + }, + "runtime" : { + "requires" : { + "File::Path" : "2.07", + "File::Slurp" : "0", + "perl" : "5.008001" + } + } + }, + "release_status" : "unstable", + "resources" : { + "bugtracker" : { + "web" : "https://github.com/tsucchi/Test-Mock-Net-FTP/issues" + }, + "homepage" : "https://github.com/tsucchi/Test-Mock-Net-FTP", + "repository" : { + "type" : "git", + "url" : "git://github.com/tsucchi/Test-Mock-Net-FTP.git", + "web" : "https://github.com/tsucchi/Test-Mock-Net-FTP" + } + }, + "version" : "0.02", + "x_contributors" : [ + "tsucchi ", + "Takuya Tsuchida " + ], + "x_serialization_backend" : "JSON::PP version 2.27300" +} diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..1868e38 --- /dev/null +++ b/Makefile @@ -0,0 +1,825 @@ +# This Makefile is for the Test::Mock::Net::FTP extension to perl. +# +# It was generated automatically by MakeMaker version +# 6.68 (Revision: 66800) from the contents of +# Makefile.PL. Don't edit this file, edit Makefile.PL instead. +# +# ANY CHANGES MADE HERE WILL BE LOST! +# +# MakeMaker ARGV: () +# + +# MakeMaker Parameters: + +# ABSTRACT => q[Mock Object for Net::FTP] +# AUTHOR => [q[Takuya Tsuchida ]] +# BUILD_REQUIRES => { Test::More=>q[0.94], parent=>q[0], Capture::Tiny=>q[0], ExtUtils::MakeMaker=>q[6.59] } +# CONFIGURE_REQUIRES => { } +# DISTNAME => q[Test-Mock-Net-FTP] +# LICENSE => q[perl] +# MIN_PERL_VERSION => q[5.008] +# NAME => q[Test::Mock::Net::FTP] +# NO_META => q[1] +# PREREQ_PM => { ExtUtils::MakeMaker=>q[6.59], parent=>q[0], Capture::Tiny=>q[0], File::Slurp=>q[0], File::Path=>q[2.07], Test::More=>q[0.94] } +# TEST_REQUIRES => { } +# VERSION => q[0.02] +# VERSION_FROM => q[lib/Test/Mock/Net/FTP.pm] +# dist => { PREOP=>q[$(PERL) -I. "-MModule::Install::Admin" -e "dist_preop(q($(DISTVNAME)))"] } +# realclean => { FILES=>q[MYMETA.yml] } +# test => { TESTS=>q[t/*.t xt/*.t] } + +# --- MakeMaker post_initialize section: + + +# --- MakeMaker const_config section: + +# These definitions are from config.sh (via /Users/tsucchi/perl5/perlbrew/perls/perl-5.19/lib/5.19.1/darwin-2level/Config.pm). +# They may have been overridden via Makefile.PL or on the command line. +AR = ar +CC = cc +CCCDLFLAGS = +CCDLFLAGS = +DLEXT = bundle +DLSRC = dl_dlopen.xs +EXE_EXT = +FULL_AR = /usr/bin/ar +LD = env MACOSX_DEPLOYMENT_TARGET=10.3 cc +LDDLFLAGS = -bundle -undefined dynamic_lookup -L/usr/local/lib -fstack-protector +LDFLAGS = -fstack-protector -L/usr/local/lib +LIBC = +LIB_EXT = .a +OBJ_EXT = .o +OSNAME = darwin +OSVERS = 12.4.1 +RANLIB = ranlib +SITELIBEXP = /Users/tsucchi/perl5/perlbrew/perls/perl-5.19/lib/site_perl/5.19.1 +SITEARCHEXP = /Users/tsucchi/perl5/perlbrew/perls/perl-5.19/lib/site_perl/5.19.1/darwin-2level +SO = dylib +VENDORARCHEXP = +VENDORLIBEXP = + + +# --- MakeMaker constants section: +AR_STATIC_ARGS = cr +DIRFILESEP = / +DFSEP = $(DIRFILESEP) +NAME = Test::Mock::Net::FTP +NAME_SYM = Test_Mock_Net_FTP +VERSION = 0.02 +VERSION_MACRO = VERSION +VERSION_SYM = 0_02 +DEFINE_VERSION = -D$(VERSION_MACRO)=\"$(VERSION)\" +XS_VERSION = 0.02 +XS_VERSION_MACRO = XS_VERSION +XS_DEFINE_VERSION = -D$(XS_VERSION_MACRO)=\"$(XS_VERSION)\" +INST_ARCHLIB = blib/arch +INST_SCRIPT = blib/script +INST_BIN = blib/bin +INST_LIB = blib/lib +INST_MAN1DIR = blib/man1 +INST_MAN3DIR = blib/man3 +MAN1EXT = 1 +MAN3EXT = 3 +INSTALLDIRS = site +INSTALL_BASE = /Users/tsucchi/.perlbrew/libs/perl-5.19@default +DESTDIR = +PREFIX = $(INSTALL_BASE) +INSTALLPRIVLIB = $(INSTALL_BASE)/lib/perl5 +DESTINSTALLPRIVLIB = $(DESTDIR)$(INSTALLPRIVLIB) +INSTALLSITELIB = $(INSTALL_BASE)/lib/perl5 +DESTINSTALLSITELIB = $(DESTDIR)$(INSTALLSITELIB) +INSTALLVENDORLIB = $(INSTALL_BASE)/lib/perl5 +DESTINSTALLVENDORLIB = $(DESTDIR)$(INSTALLVENDORLIB) +INSTALLARCHLIB = $(INSTALL_BASE)/lib/perl5/darwin-2level +DESTINSTALLARCHLIB = $(DESTDIR)$(INSTALLARCHLIB) +INSTALLSITEARCH = $(INSTALL_BASE)/lib/perl5/darwin-2level +DESTINSTALLSITEARCH = $(DESTDIR)$(INSTALLSITEARCH) +INSTALLVENDORARCH = $(INSTALL_BASE)/lib/perl5/darwin-2level +DESTINSTALLVENDORARCH = $(DESTDIR)$(INSTALLVENDORARCH) +INSTALLBIN = $(INSTALL_BASE)/bin +DESTINSTALLBIN = $(DESTDIR)$(INSTALLBIN) +INSTALLSITEBIN = $(INSTALL_BASE)/bin +DESTINSTALLSITEBIN = $(DESTDIR)$(INSTALLSITEBIN) +INSTALLVENDORBIN = $(INSTALL_BASE)/bin +DESTINSTALLVENDORBIN = $(DESTDIR)$(INSTALLVENDORBIN) +INSTALLSCRIPT = $(INSTALL_BASE)/bin +DESTINSTALLSCRIPT = $(DESTDIR)$(INSTALLSCRIPT) +INSTALLSITESCRIPT = $(INSTALL_BASE)/bin +DESTINSTALLSITESCRIPT = $(DESTDIR)$(INSTALLSITESCRIPT) +INSTALLVENDORSCRIPT = $(INSTALL_BASE)/bin +DESTINSTALLVENDORSCRIPT = $(DESTDIR)$(INSTALLVENDORSCRIPT) +INSTALLMAN1DIR = $(INSTALL_BASE)/man/man1 +DESTINSTALLMAN1DIR = $(DESTDIR)$(INSTALLMAN1DIR) +INSTALLSITEMAN1DIR = $(INSTALL_BASE)/man/man1 +DESTINSTALLSITEMAN1DIR = $(DESTDIR)$(INSTALLSITEMAN1DIR) +INSTALLVENDORMAN1DIR = $(INSTALL_BASE)/man/man1 +DESTINSTALLVENDORMAN1DIR = $(DESTDIR)$(INSTALLVENDORMAN1DIR) +INSTALLMAN3DIR = $(INSTALL_BASE)/man/man3 +DESTINSTALLMAN3DIR = $(DESTDIR)$(INSTALLMAN3DIR) +INSTALLSITEMAN3DIR = $(INSTALL_BASE)/man/man3 +DESTINSTALLSITEMAN3DIR = $(DESTDIR)$(INSTALLSITEMAN3DIR) +INSTALLVENDORMAN3DIR = $(INSTALL_BASE)/man/man3 +DESTINSTALLVENDORMAN3DIR = $(DESTDIR)$(INSTALLVENDORMAN3DIR) +PERL_LIB = +PERL_ARCHLIB = /Users/tsucchi/perl5/perlbrew/perls/perl-5.19/lib/5.19.1/darwin-2level +LIBPERL_A = libperl.a +FIRST_MAKEFILE = Makefile +MAKEFILE_OLD = Makefile.old +MAKE_APERL_FILE = Makefile.aperl +PERLMAINCC = $(CC) +PERL_INC = /Users/tsucchi/perl5/perlbrew/perls/perl-5.19/lib/5.19.1/darwin-2level/CORE +PERL = /Users/tsucchi/perl5/perlbrew/perls/perl-5.19/bin/perl5.19.1 "-Iinc" +FULLPERL = /Users/tsucchi/perl5/perlbrew/perls/perl-5.19/bin/perl5.19.1 "-Iinc" +ABSPERL = $(PERL) +PERLRUN = $(PERL) +FULLPERLRUN = $(FULLPERL) +ABSPERLRUN = $(ABSPERL) +PERLRUNINST = $(PERLRUN) "-I$(INST_ARCHLIB)" "-Iinc" "-I$(INST_LIB)" +FULLPERLRUNINST = $(FULLPERLRUN) "-I$(INST_ARCHLIB)" "-Iinc" "-I$(INST_LIB)" +ABSPERLRUNINST = $(ABSPERLRUN) "-I$(INST_ARCHLIB)" "-Iinc" "-I$(INST_LIB)" +PERL_CORE = 0 +PERM_DIR = 755 +PERM_RW = 644 +PERM_RWX = 755 + +MAKEMAKER = /Users/tsucchi/perl5/perlbrew/perls/perl-5.19/lib/5.19.1/ExtUtils/MakeMaker.pm +MM_VERSION = 6.68 +MM_REVISION = 66800 + +# FULLEXT = Pathname for extension directory (eg Foo/Bar/Oracle). +# BASEEXT = Basename part of FULLEXT. May be just equal FULLEXT. (eg Oracle) +# PARENT_NAME = NAME without BASEEXT and no trailing :: (eg Foo::Bar) +# DLBASE = Basename part of dynamic library. May be just equal BASEEXT. +MAKE = make +FULLEXT = Test/Mock/Net/FTP +BASEEXT = FTP +PARENT_NAME = Test::Mock::Net +DLBASE = $(BASEEXT) +VERSION_FROM = lib/Test/Mock/Net/FTP.pm +OBJECT = +LDFROM = $(OBJECT) +LINKTYPE = dynamic +BOOTDEP = + +# Handy lists of source code files: +XS_FILES = +C_FILES = +O_FILES = +H_FILES = +MAN1PODS = +MAN3PODS = lib/Test/Mock/Net/FTP.pm + +# Where is the Config information that we are using/depend on +CONFIGDEP = $(PERL_ARCHLIB)$(DFSEP)Config.pm $(PERL_INC)$(DFSEP)config.h + +# Where to build things +INST_LIBDIR = $(INST_LIB)/Test/Mock/Net +INST_ARCHLIBDIR = $(INST_ARCHLIB)/Test/Mock/Net + +INST_AUTODIR = $(INST_LIB)/auto/$(FULLEXT) +INST_ARCHAUTODIR = $(INST_ARCHLIB)/auto/$(FULLEXT) + +INST_STATIC = +INST_DYNAMIC = +INST_BOOT = + +# Extra linker info +EXPORT_LIST = +PERL_ARCHIVE = +PERL_ARCHIVE_AFTER = + + +TO_INST_PM = lib/Test/Mock/Net/FTP.pm + +PM_TO_BLIB = lib/Test/Mock/Net/FTP.pm \ + blib/lib/Test/Mock/Net/FTP.pm + + +# --- MakeMaker platform_constants section: +MM_Unix_VERSION = 6.68 +PERL_MALLOC_DEF = -DPERL_EXTMALLOC_DEF -Dmalloc=Perl_malloc -Dfree=Perl_mfree -Drealloc=Perl_realloc -Dcalloc=Perl_calloc + + +# --- MakeMaker tool_autosplit section: +# Usage: $(AUTOSPLITFILE) FileToSplit AutoDirToSplitInto +AUTOSPLITFILE = $(ABSPERLRUN) -e 'use AutoSplit; autosplit($$$$ARGV[0], $$$$ARGV[1], 0, 1, 1)' -- + + + +# --- MakeMaker tool_xsubpp section: + + +# --- MakeMaker tools_other section: +SHELL = /bin/sh +CHMOD = chmod +CP = cp +MV = mv +NOOP = $(TRUE) +NOECHO = @ +RM_F = rm -f +RM_RF = rm -rf +TEST_F = test -f +TOUCH = touch +UMASK_NULL = umask 0 +DEV_NULL = > /dev/null 2>&1 +MKPATH = $(ABSPERLRUN) -MExtUtils::Command -e 'mkpath' -- +EQUALIZE_TIMESTAMP = $(ABSPERLRUN) -MExtUtils::Command -e 'eqtime' -- +FALSE = false +TRUE = true +ECHO = echo +ECHO_N = echo -n +UNINST = 0 +VERBINST = 0 +MOD_INSTALL = $(ABSPERLRUN) -MExtUtils::Install -e 'install([ from_to => {@ARGV}, verbose => '\''$(VERBINST)'\'', uninstall_shadows => '\''$(UNINST)'\'', dir_mode => '\''$(PERM_DIR)'\'' ]);' -- +DOC_INSTALL = $(ABSPERLRUN) -MExtUtils::Command::MM -e 'perllocal_install' -- +UNINSTALL = $(ABSPERLRUN) -MExtUtils::Command::MM -e 'uninstall' -- +WARN_IF_OLD_PACKLIST = $(ABSPERLRUN) -MExtUtils::Command::MM -e 'warn_if_old_packlist' -- +MACROSTART = +MACROEND = +USEMAKEFILE = -f +FIXIN = $(ABSPERLRUN) -MExtUtils::MY -e 'MY->fixin(shift)' -- + + +# --- MakeMaker makemakerdflt section: +makemakerdflt : all + $(NOECHO) $(NOOP) + + +# --- MakeMaker dist section: +TAR = COPY_EXTENDED_ATTRIBUTES_DISABLE=1 COPYFILE_DISABLE=1 tar +TARFLAGS = cvf +ZIP = zip +ZIPFLAGS = -r +COMPRESS = gzip --best +SUFFIX = .gz +SHAR = shar +PREOP = $(PERL) -I. "-MModule::Install::Admin" -e "dist_preop(q($(DISTVNAME)))" +POSTOP = $(NOECHO) $(NOOP) +TO_UNIX = $(NOECHO) $(NOOP) +CI = ci -u +RCS_LABEL = rcs -Nv$(VERSION_SYM): -q +DIST_CP = best +DIST_DEFAULT = tardist +DISTNAME = Test-Mock-Net-FTP +DISTVNAME = Test-Mock-Net-FTP-0.02 + + +# --- MakeMaker macro section: + + +# --- MakeMaker depend section: + + +# --- MakeMaker cflags section: + + +# --- MakeMaker const_loadlibs section: + + +# --- MakeMaker const_cccmd section: + + +# --- MakeMaker post_constants section: + + +# --- MakeMaker pasthru section: + +PASTHRU = LIBPERL_A="$(LIBPERL_A)"\ + LINKTYPE="$(LINKTYPE)"\ + PREFIX="$(PREFIX)"\ + INSTALL_BASE="$(INSTALL_BASE)" + + +# --- MakeMaker special_targets section: +.SUFFIXES : .xs .c .C .cpp .i .s .cxx .cc $(OBJ_EXT) + +.PHONY: all config static dynamic test linkext manifest blibdirs clean realclean disttest distdir + + + +# --- MakeMaker c_o section: + + +# --- MakeMaker xs_c section: + + +# --- MakeMaker xs_o section: + + +# --- MakeMaker top_targets section: +all :: pure_all manifypods + $(NOECHO) $(NOOP) + + +pure_all :: config pm_to_blib subdirs linkext + $(NOECHO) $(NOOP) + +subdirs :: $(MYEXTLIB) + $(NOECHO) $(NOOP) + +config :: $(FIRST_MAKEFILE) blibdirs + $(NOECHO) $(NOOP) + +help : + perldoc ExtUtils::MakeMaker + + +# --- MakeMaker blibdirs section: +blibdirs : $(INST_LIBDIR)$(DFSEP).exists $(INST_ARCHLIB)$(DFSEP).exists $(INST_AUTODIR)$(DFSEP).exists $(INST_ARCHAUTODIR)$(DFSEP).exists $(INST_BIN)$(DFSEP).exists $(INST_SCRIPT)$(DFSEP).exists $(INST_MAN1DIR)$(DFSEP).exists $(INST_MAN3DIR)$(DFSEP).exists + $(NOECHO) $(NOOP) + +# Backwards compat with 6.18 through 6.25 +blibdirs.ts : blibdirs + $(NOECHO) $(NOOP) + +$(INST_LIBDIR)$(DFSEP).exists :: Makefile.PL + $(NOECHO) $(MKPATH) $(INST_LIBDIR) + $(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_LIBDIR) + $(NOECHO) $(TOUCH) $(INST_LIBDIR)$(DFSEP).exists + +$(INST_ARCHLIB)$(DFSEP).exists :: Makefile.PL + $(NOECHO) $(MKPATH) $(INST_ARCHLIB) + $(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_ARCHLIB) + $(NOECHO) $(TOUCH) $(INST_ARCHLIB)$(DFSEP).exists + +$(INST_AUTODIR)$(DFSEP).exists :: Makefile.PL + $(NOECHO) $(MKPATH) $(INST_AUTODIR) + $(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_AUTODIR) + $(NOECHO) $(TOUCH) $(INST_AUTODIR)$(DFSEP).exists + +$(INST_ARCHAUTODIR)$(DFSEP).exists :: Makefile.PL + $(NOECHO) $(MKPATH) $(INST_ARCHAUTODIR) + $(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_ARCHAUTODIR) + $(NOECHO) $(TOUCH) $(INST_ARCHAUTODIR)$(DFSEP).exists + +$(INST_BIN)$(DFSEP).exists :: Makefile.PL + $(NOECHO) $(MKPATH) $(INST_BIN) + $(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_BIN) + $(NOECHO) $(TOUCH) $(INST_BIN)$(DFSEP).exists + +$(INST_SCRIPT)$(DFSEP).exists :: Makefile.PL + $(NOECHO) $(MKPATH) $(INST_SCRIPT) + $(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_SCRIPT) + $(NOECHO) $(TOUCH) $(INST_SCRIPT)$(DFSEP).exists + +$(INST_MAN1DIR)$(DFSEP).exists :: Makefile.PL + $(NOECHO) $(MKPATH) $(INST_MAN1DIR) + $(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_MAN1DIR) + $(NOECHO) $(TOUCH) $(INST_MAN1DIR)$(DFSEP).exists + +$(INST_MAN3DIR)$(DFSEP).exists :: Makefile.PL + $(NOECHO) $(MKPATH) $(INST_MAN3DIR) + $(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_MAN3DIR) + $(NOECHO) $(TOUCH) $(INST_MAN3DIR)$(DFSEP).exists + + + +# --- MakeMaker linkext section: + +linkext :: $(LINKTYPE) + $(NOECHO) $(NOOP) + + +# --- MakeMaker dlsyms section: + + +# --- MakeMaker dynamic section: + +dynamic :: $(FIRST_MAKEFILE) $(INST_DYNAMIC) $(INST_BOOT) + $(NOECHO) $(NOOP) + + +# --- MakeMaker dynamic_bs section: + +BOOTSTRAP = + + +# --- MakeMaker dynamic_lib section: + + +# --- MakeMaker static section: + +## $(INST_PM) has been moved to the all: target. +## It remains here for awhile to allow for old usage: "make static" +static :: $(FIRST_MAKEFILE) $(INST_STATIC) + $(NOECHO) $(NOOP) + + +# --- MakeMaker static_lib section: + + +# --- MakeMaker manifypods section: + +POD2MAN_EXE = $(PERLRUN) "-MExtUtils::Command::MM" -e pod2man "--" +POD2MAN = $(POD2MAN_EXE) + + +manifypods : pure_all \ + lib/Test/Mock/Net/FTP.pm + $(NOECHO) $(POD2MAN) --section=3 --perm_rw=$(PERM_RW) \ + lib/Test/Mock/Net/FTP.pm $(INST_MAN3DIR)/Test::Mock::Net::FTP.$(MAN3EXT) + + + + +# --- MakeMaker processPL section: + + +# --- MakeMaker installbin section: + + +# --- MakeMaker subdirs section: + +# none + +# --- MakeMaker clean_subdirs section: +clean_subdirs : + $(NOECHO) $(NOOP) + + +# --- MakeMaker clean section: + +# Delete temporary files but do not touch installed files. We don't delete +# the Makefile here so a later make realclean still has a makefile to use. + +clean :: clean_subdirs + - $(RM_F) \ + *$(OBJ_EXT) perl.exe \ + core.[0-9][0-9][0-9][0-9][0-9] core.[0-9][0-9] \ + pm_to_blib.ts core \ + $(INST_ARCHAUTODIR)/extralibs.all perlmain.c \ + $(INST_ARCHAUTODIR)/extralibs.ld $(BASEEXT).bso \ + lib$(BASEEXT).def core.*perl.*.? \ + $(BASEEXT).def $(BOOTSTRAP) \ + *perl.core core.[0-9] \ + core.[0-9][0-9][0-9] $(MAKE_APERL_FILE) \ + core.[0-9][0-9][0-9][0-9] so_locations \ + *$(LIB_EXT) mon.out \ + perl blibdirs.ts \ + pm_to_blib MYMETA.json \ + tmon.out MYMETA.yml \ + $(BASEEXT).x $(BASEEXT).exp \ + perl$(EXE_EXT) + - $(RM_RF) \ + blib + - $(MV) $(FIRST_MAKEFILE) $(MAKEFILE_OLD) $(DEV_NULL) + + +# --- MakeMaker realclean_subdirs section: +realclean_subdirs : + $(NOECHO) $(NOOP) + + +# --- MakeMaker realclean section: +# Delete temporary files (via clean) and also delete dist files +realclean purge :: clean realclean_subdirs + - $(RM_F) \ + $(FIRST_MAKEFILE) $(MAKEFILE_OLD) + - $(RM_RF) \ + $(DISTVNAME) MYMETA.yml + + +# --- MakeMaker metafile section: +metafile : + $(NOECHO) $(NOOP) + + +# --- MakeMaker signature section: +signature : + cpansign -s + + +# --- MakeMaker dist_basics section: +distclean :: realclean distcheck + $(NOECHO) $(NOOP) + +distcheck : + $(PERLRUN) "-MExtUtils::Manifest=fullcheck" -e fullcheck + +skipcheck : + $(PERLRUN) "-MExtUtils::Manifest=skipcheck" -e skipcheck + +manifest : + $(PERLRUN) "-MExtUtils::Manifest=mkmanifest" -e mkmanifest + +veryclean : realclean + $(RM_F) *~ */*~ *.orig */*.orig *.bak */*.bak *.old */*.old + + + +# --- MakeMaker dist_core section: + +dist : $(DIST_DEFAULT) $(FIRST_MAKEFILE) + $(NOECHO) $(ABSPERLRUN) -l -e 'print '\''Warning: Makefile possibly out of date with $(VERSION_FROM)'\''' \ + -e ' if -e '\''$(VERSION_FROM)'\'' and -M '\''$(VERSION_FROM)'\'' < -M '\''$(FIRST_MAKEFILE)'\'';' -- + +tardist : $(DISTVNAME).tar$(SUFFIX) + $(NOECHO) $(NOOP) + +uutardist : $(DISTVNAME).tar$(SUFFIX) + uuencode $(DISTVNAME).tar$(SUFFIX) $(DISTVNAME).tar$(SUFFIX) > $(DISTVNAME).tar$(SUFFIX)_uu + +$(DISTVNAME).tar$(SUFFIX) : distdir + $(PREOP) + $(TO_UNIX) + $(TAR) $(TARFLAGS) $(DISTVNAME).tar $(DISTVNAME) + $(RM_RF) $(DISTVNAME) + $(COMPRESS) $(DISTVNAME).tar + $(POSTOP) + +zipdist : $(DISTVNAME).zip + $(NOECHO) $(NOOP) + +$(DISTVNAME).zip : distdir + $(PREOP) + $(ZIP) $(ZIPFLAGS) $(DISTVNAME).zip $(DISTVNAME) + $(RM_RF) $(DISTVNAME) + $(POSTOP) + +shdist : distdir + $(PREOP) + $(SHAR) $(DISTVNAME) > $(DISTVNAME).shar + $(RM_RF) $(DISTVNAME) + $(POSTOP) + + +# --- MakeMaker distdir section: +create_distdir : + $(RM_RF) $(DISTVNAME) + $(PERLRUN) "-MExtUtils::Manifest=manicopy,maniread" \ + -e "manicopy(maniread(),'$(DISTVNAME)', '$(DIST_CP)');" + +distdir : create_distdir + $(NOECHO) $(NOOP) + + + +# --- MakeMaker dist_test section: +disttest : distdir + cd $(DISTVNAME) && $(ABSPERLRUN) Makefile.PL + cd $(DISTVNAME) && $(MAKE) $(PASTHRU) + cd $(DISTVNAME) && $(MAKE) test $(PASTHRU) + + + +# --- MakeMaker dist_ci section: + +ci : + $(PERLRUN) "-MExtUtils::Manifest=maniread" \ + -e "@all = keys %{ maniread() };" \ + -e "print(qq{Executing $(CI) @all\n}); system(qq{$(CI) @all});" \ + -e "print(qq{Executing $(RCS_LABEL) ...\n}); system(qq{$(RCS_LABEL) @all});" + + +# --- MakeMaker distmeta section: +distmeta : create_distdir metafile + $(NOECHO) cd $(DISTVNAME) && $(ABSPERLRUN) -MExtUtils::Manifest=maniadd -e 'exit unless -e q{META.yml};' \ + -e 'eval { maniadd({q{META.yml} => q{Module YAML meta-data (added by MakeMaker)}}) }' \ + -e ' or print "Could not add META.yml to MANIFEST: $$$${'\''@'\''}\n"' -- + $(NOECHO) cd $(DISTVNAME) && $(ABSPERLRUN) -MExtUtils::Manifest=maniadd -e 'exit unless -f q{META.json};' \ + -e 'eval { maniadd({q{META.json} => q{Module JSON meta-data (added by MakeMaker)}}) }' \ + -e ' or print "Could not add META.json to MANIFEST: $$$${'\''@'\''}\n"' -- + + + +# --- MakeMaker distsignature section: +distsignature : create_distdir + $(NOECHO) cd $(DISTVNAME) && $(ABSPERLRUN) -MExtUtils::Manifest=maniadd -e 'eval { maniadd({q{SIGNATURE} => q{Public-key signature (added by MakeMaker)}}) } ' \ + -e ' or print "Could not add SIGNATURE to MANIFEST: $$$${'\''@'\''}\n"' -- + $(NOECHO) cd $(DISTVNAME) && $(TOUCH) SIGNATURE + cd $(DISTVNAME) && cpansign -s + + + +# --- MakeMaker install section: + +install :: pure_install doc_install + $(NOECHO) $(NOOP) + +install_perl :: pure_perl_install doc_perl_install + $(NOECHO) $(NOOP) + +install_site :: pure_site_install doc_site_install + $(NOECHO) $(NOOP) + +install_vendor :: pure_vendor_install doc_vendor_install + $(NOECHO) $(NOOP) + +pure_install :: pure_$(INSTALLDIRS)_install + $(NOECHO) $(NOOP) + +doc_install :: doc_$(INSTALLDIRS)_install + $(NOECHO) $(NOOP) + +pure__install : pure_site_install + $(NOECHO) $(ECHO) INSTALLDIRS not defined, defaulting to INSTALLDIRS=site + +doc__install : doc_site_install + $(NOECHO) $(ECHO) INSTALLDIRS not defined, defaulting to INSTALLDIRS=site + +pure_perl_install :: all + $(NOECHO) $(MOD_INSTALL) \ + read $(PERL_ARCHLIB)/auto/$(FULLEXT)/.packlist \ + write $(DESTINSTALLARCHLIB)/auto/$(FULLEXT)/.packlist \ + $(INST_LIB) $(DESTINSTALLPRIVLIB) \ + $(INST_ARCHLIB) $(DESTINSTALLARCHLIB) \ + $(INST_BIN) $(DESTINSTALLBIN) \ + $(INST_SCRIPT) $(DESTINSTALLSCRIPT) \ + $(INST_MAN1DIR) $(DESTINSTALLMAN1DIR) \ + $(INST_MAN3DIR) $(DESTINSTALLMAN3DIR) + $(NOECHO) $(WARN_IF_OLD_PACKLIST) \ + $(SITEARCHEXP)/auto/$(FULLEXT) + + +pure_site_install :: all + $(NOECHO) $(MOD_INSTALL) \ + read $(SITEARCHEXP)/auto/$(FULLEXT)/.packlist \ + write $(DESTINSTALLSITEARCH)/auto/$(FULLEXT)/.packlist \ + $(INST_LIB) $(DESTINSTALLSITELIB) \ + $(INST_ARCHLIB) $(DESTINSTALLSITEARCH) \ + $(INST_BIN) $(DESTINSTALLSITEBIN) \ + $(INST_SCRIPT) $(DESTINSTALLSITESCRIPT) \ + $(INST_MAN1DIR) $(DESTINSTALLSITEMAN1DIR) \ + $(INST_MAN3DIR) $(DESTINSTALLSITEMAN3DIR) + $(NOECHO) $(WARN_IF_OLD_PACKLIST) \ + $(PERL_ARCHLIB)/auto/$(FULLEXT) + +pure_vendor_install :: all + $(NOECHO) $(MOD_INSTALL) \ + read $(VENDORARCHEXP)/auto/$(FULLEXT)/.packlist \ + write $(DESTINSTALLVENDORARCH)/auto/$(FULLEXT)/.packlist \ + $(INST_LIB) $(DESTINSTALLVENDORLIB) \ + $(INST_ARCHLIB) $(DESTINSTALLVENDORARCH) \ + $(INST_BIN) $(DESTINSTALLVENDORBIN) \ + $(INST_SCRIPT) $(DESTINSTALLVENDORSCRIPT) \ + $(INST_MAN1DIR) $(DESTINSTALLVENDORMAN1DIR) \ + $(INST_MAN3DIR) $(DESTINSTALLVENDORMAN3DIR) + +doc_perl_install :: all + $(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLARCHLIB)/perllocal.pod + -$(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB) + -$(NOECHO) $(DOC_INSTALL) \ + "Module" "$(NAME)" \ + "installed into" "$(INSTALLPRIVLIB)" \ + LINKTYPE "$(LINKTYPE)" \ + VERSION "$(VERSION)" \ + EXE_FILES "$(EXE_FILES)" \ + >> $(DESTINSTALLARCHLIB)/perllocal.pod + +doc_site_install :: all + $(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLARCHLIB)/perllocal.pod + -$(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB) + -$(NOECHO) $(DOC_INSTALL) \ + "Module" "$(NAME)" \ + "installed into" "$(INSTALLSITELIB)" \ + LINKTYPE "$(LINKTYPE)" \ + VERSION "$(VERSION)" \ + EXE_FILES "$(EXE_FILES)" \ + >> $(DESTINSTALLARCHLIB)/perllocal.pod + +doc_vendor_install :: all + $(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLARCHLIB)/perllocal.pod + -$(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB) + -$(NOECHO) $(DOC_INSTALL) \ + "Module" "$(NAME)" \ + "installed into" "$(INSTALLVENDORLIB)" \ + LINKTYPE "$(LINKTYPE)" \ + VERSION "$(VERSION)" \ + EXE_FILES "$(EXE_FILES)" \ + >> $(DESTINSTALLARCHLIB)/perllocal.pod + + +uninstall :: uninstall_from_$(INSTALLDIRS)dirs + $(NOECHO) $(NOOP) + +uninstall_from_perldirs :: + $(NOECHO) $(UNINSTALL) $(PERL_ARCHLIB)/auto/$(FULLEXT)/.packlist + +uninstall_from_sitedirs :: + $(NOECHO) $(UNINSTALL) $(SITEARCHEXP)/auto/$(FULLEXT)/.packlist + +uninstall_from_vendordirs :: + $(NOECHO) $(UNINSTALL) $(VENDORARCHEXP)/auto/$(FULLEXT)/.packlist + + +# --- MakeMaker force section: +# Phony target to force checking subdirectories. +FORCE : + $(NOECHO) $(NOOP) + + +# --- MakeMaker perldepend section: + + +# --- MakeMaker makefile section: +# We take a very conservative approach here, but it's worth it. +# We move Makefile to Makefile.old here to avoid gnu make looping. +$(FIRST_MAKEFILE) : Makefile.PL $(CONFIGDEP) + $(NOECHO) $(ECHO) "Makefile out-of-date with respect to $?" + $(NOECHO) $(ECHO) "Cleaning current config before rebuilding Makefile..." + -$(NOECHO) $(RM_F) $(MAKEFILE_OLD) + -$(NOECHO) $(MV) $(FIRST_MAKEFILE) $(MAKEFILE_OLD) + - $(MAKE) $(USEMAKEFILE) $(MAKEFILE_OLD) clean $(DEV_NULL) + $(PERLRUN) Makefile.PL + $(NOECHO) $(ECHO) "==> Your Makefile has been rebuilt. <==" + $(NOECHO) $(ECHO) "==> Please rerun the $(MAKE) command. <==" + $(FALSE) + + + +# --- MakeMaker staticmake section: + +# --- MakeMaker makeaperl section --- +MAP_TARGET = perl +FULLPERL = /Users/tsucchi/perl5/perlbrew/perls/perl-5.19/bin/perl5.19.1 + +$(MAP_TARGET) :: static $(MAKE_APERL_FILE) + $(MAKE) $(USEMAKEFILE) $(MAKE_APERL_FILE) $@ + +$(MAKE_APERL_FILE) : $(FIRST_MAKEFILE) pm_to_blib + $(NOECHO) $(ECHO) Writing \"$(MAKE_APERL_FILE)\" for this $(MAP_TARGET) + $(NOECHO) $(PERLRUNINST) \ + Makefile.PL DIR= \ + MAKEFILE=$(MAKE_APERL_FILE) LINKTYPE=static \ + MAKEAPERL=1 NORECURS=1 CCCDLFLAGS= + + +# --- MakeMaker test section: + +TEST_VERBOSE=0 +TEST_TYPE=test_$(LINKTYPE) +TEST_FILE = test.pl +TEST_FILES = t/*.t xt/*.t +TESTDB_SW = -d + +testdb :: testdb_$(LINKTYPE) + +test :: $(TEST_TYPE) subdirs-test + +subdirs-test :: + $(NOECHO) $(NOOP) + + +test_dynamic :: pure_all + PERL_DL_NONLAZY=1 $(FULLPERLRUN) "-MExtUtils::Command::MM" "-e" "test_harness($(TEST_VERBOSE), 'inc', '$(INST_LIB)', '$(INST_ARCHLIB)')" $(TEST_FILES) + +testdb_dynamic :: pure_all + PERL_DL_NONLAZY=1 $(FULLPERLRUN) $(TESTDB_SW) "-Iinc" "-I$(INST_LIB)" "-I$(INST_ARCHLIB)" $(TEST_FILE) + +test_ : test_dynamic + +test_static :: test_dynamic +testdb_static :: testdb_dynamic + + +# --- MakeMaker ppd section: +# Creates a PPD (Perl Package Description) for a binary distribution. +ppd : + $(NOECHO) $(ECHO) '' > $(DISTNAME).ppd + $(NOECHO) $(ECHO) ' Mock Object for Net::FTP' >> $(DISTNAME).ppd + $(NOECHO) $(ECHO) ' Takuya Tsuchida <tsucchi at cpan.org>' >> $(DISTNAME).ppd + $(NOECHO) $(ECHO) ' ' >> $(DISTNAME).ppd + $(NOECHO) $(ECHO) ' ' >> $(DISTNAME).ppd + $(NOECHO) $(ECHO) ' ' >> $(DISTNAME).ppd + $(NOECHO) $(ECHO) ' ' >> $(DISTNAME).ppd + $(NOECHO) $(ECHO) ' ' >> $(DISTNAME).ppd + $(NOECHO) $(ECHO) ' ' >> $(DISTNAME).ppd + $(NOECHO) $(ECHO) ' ' >> $(DISTNAME).ppd + $(NOECHO) $(ECHO) '' >> $(DISTNAME).ppd + + +# --- MakeMaker pm_to_blib section: + +pm_to_blib : $(FIRST_MAKEFILE) $(TO_INST_PM) + $(NOECHO) $(ABSPERLRUN) -MExtUtils::Install -e 'pm_to_blib({@ARGV}, '\''$(INST_LIB)/auto'\'', q[$(PM_FILTER)], '\''$(PERM_DIR)'\'')' -- \ + lib/Test/Mock/Net/FTP.pm blib/lib/Test/Mock/Net/FTP.pm + $(NOECHO) $(TOUCH) pm_to_blib + + +# --- MakeMaker selfdocument section: + + +# --- MakeMaker postamble section: + + +# End. +# Postamble by Module::Install 1.06 +# --- Module::Install::Admin::Makefile section: + +realclean purge :: + $(RM_F) $(DISTVNAME).tar$(SUFFIX) + $(RM_F) MANIFEST.bak _build + $(PERL) "-Ilib" "-MModule::Install::Admin" -e "remove_meta()" + $(RM_RF) inc + +reset :: purge + +upload :: test dist + cpan-upload -verbose $(DISTVNAME).tar$(SUFFIX) + +grok :: + perldoc Module::Install + +distsign :: + cpansign -s + diff --git a/Makefile.PL b/Makefile.PL deleted file mode 100755 index f554bb4..0000000 --- a/Makefile.PL +++ /dev/null @@ -1,28 +0,0 @@ -use lib '.'; -use inc::Module::Install; - -name 'Test-Mock-Net-FTP'; -author 'Takuya Tsuchida '; -license 'perl'; - -perl_version '5.008'; -all_from 'lib/Test/Mock/Net/FTP.pm'; - -requires 'File::Slurp'; -requires 'File::Path' => '2.07'; # for make_path/remove_tree -test_requires 'Test::More' => '0.94'; # want to use done_testing() and subtest -test_requires 'parent'; -test_requires 'Capture::Tiny'; - -author_tests 'xt'; -author_requires 'Test::Perl::Critic'; -author_requires 'Test::Synopsis'; -author_requires 'Test::Pod'; -author_requires 'Test::Pod::Coverage'; -author_requires 'Test::Module::Used' => '0.1.4'; -author_requires 'Test::CheckManifest'; - -no_index 'directory' => 'tmp'; -repository 'http://github.com/tsucchi/Test-Mock-Net-FTP'; - -WriteAll; diff --git a/README.md b/README.md new file mode 100644 index 0000000..e526fe2 --- /dev/null +++ b/README.md @@ -0,0 +1,494 @@ +# NAME + +Test::Mock::Net::FTP - Mock Object for Net::FTP + +# SYNOPSIS + + use strict; + use warnings; + + use Test::More; + use Test::Mock::Net::FTP; + + Test::Mock::Net::FTP::mock_prepare( + 'somehost.example.com' => { + 'user1'=> { + password => 'secret', + dir => ['./ftpserver', '/ftproot'], + override => { + ls => sub { + return qw(aaa bbb ccc); + }, + }, + }, + } + ); + my $ftp = Test::Mock::Net::FTP->new('somehost.example.com'); + $ftp->login('user1', 'secret'); + $ftp->cwd('datadir'); + $ftp->get('file1'); + my @files = $ftp->ls();# => ('aaa', 'bbb', 'ccc'); + $ftp->quit(); + # or + use Test::Mock::Net::FTP qw(intercept); + some_method_using_ftp(); + +# DESCRIPTION + +Test::Mock::Net::FTP is Mock Object for Net::FTP. This module behave like FTP server, but only use local filesystem.(not using socket). + +# NOTICE + +- +This module is implemented all Net::FTP's methods, but some methods are 'do nothing' currently. These methods behavior may be changed in future release. +- +This module works in only Unix-like systems(does not work in MS-Windows). +- +Some errors are not reproduced in this module. +- +If you don't like default implementation of methods in this module, you can use override (or RT to me :-) + +# METHODS + +## `mock_prepare( %params )` + +prepare FTP server in your local filesystem. + +## `mock_pwd()` + +mock's current directory + +## `mock_physical_root()` + +mock's physical root directory + +## `mock_connection_mode()` + +return current connection mode (port or pasv) + +## `mock_port_no()` + +return current port no + +## `mock_transfer_mode()` + +return current transfer mode(ascii or binary) + +## `mock_command_history()` + +return command history + + my $ftp = Test::Mock::Net::FTP->new('somehost'); + $ftp->login('somehost', 'passwd'); + $ftp->ls('dir1'); + my @history = $ftp->mock_command_history(); + # => ( ['login', 'somehost', 'passwd'], ['ls', 'dir1']); + +## `mock_clear_command_history()` + +clear command history + +## `new( $host, %options )` + +create new instance + +## `login( $user, $password )` + +login mock FTP server. this method IS NOT allowed to be overridden. + +## `authorize( [$auth, [$resp]] )` + +authorize. +default implementation is 'do nothing'. this method is allowed to be overridden. + +## `mock_default_authorize( [$auth, [$resp]] )` + +default implementation for authorize. this method should be used in overridden method. + +## `site( @args )` + +execute SITE command. +default implementation is 'do nothing'. this method is allowed to be overridden. + +## `mock_default_site( @args )` + +default implementation for site. this method should be used in overridden method. + +## `ascii()` + +enter ascii mode. +mock\_transfer\_mode() returns 'ascii'. +this method is allowed to be overridden. + +## `mock_default_ascii()` + +default implementation for ascii. this method should be used in overridden method. + +## `binary()` + +enter binary mode. +mock\_transfer\_mode() returns 'binary'. +this method is allowed to be overridden. + +## `mock_default_binary()` + +default implementation for binary. this method should be used in overridden method. + +## `rename($oldname, $newname)` + +rename remote file. +this method is allowed to be overridden. + +## `mock_default_rename($oldname, $newname)` + +default implementation for rename. this method should be used in overridden method. + +## `delete( $filename )` + +delete remote file. +this method is allowed to be overridden. + +## `mock_default_delete( $filename )` + +default implementation for delete. this method should be used in overridden method. + +## `cwd( $dir )` + +change (mock) server current directory +this method is allowed to be overridden. + +## `mock_default_cwd( $dir )` + +default implementation for cwd. this method should be used in overridden method. + +## `cdup()` + +change (mock) server directory to parent +this method is allowed to be overridden. + +## `mock_default_cdup()` + +default implementation for cdup. this method should be used in overridden method. + +## `pwd()` + +return (mock) server current directory +this method is allowed to be overridden. + +## `mock_default_pwd()` + +default implementation for pwd. this method should be used in overridden method. + +## `restart( $where )` + +restart. currently do\_nothing +this method is allowed to be overridden. + +## `mock_default_restart( $where )` + +default implementation for restart. this method should be used in overridden method. + +## `rmdir( $dirname, $recursive_bool )` + +rmdir to remove (mock) server. when $recursive\_bool is true, dir is recursively removed. +this method is allowed to be overridden. + +## `mock_default_rmdir( $dirname, $recursive_bool )` + +default implementation for rmdir. this method should be used in overridden method. + +## `mkdir( $dirname, $recursive_bool )` + +mkdir to remove (mock) server. when $recursive\_bool is true, dir is recursively create. +this method is allowed to be overridden. + +## `mock_default_mkdir( $dirname, $recursive_bool )` + +default implementation for mkdir. this method should be used in overridden method. + +## `alloc( $size, [$record_size] )` + +alloc. +default implementation is 'do nothing'. this method is allowed to be overridden. + +## `mock_default_alloc( $size, [$record_size] )` + +default implementation for alloc. this method should be used in overridden method. + +## `ls( [$dir] )` + +list file(s) in server directory. +this method is allowed to be overridden. + +## `mock_default_ls( [$dir] )` + +default implementation for ls. this method should be used in overridden method. + +## `dir( [$dir] )` + +list file(s) with detail information(ex. filesize) in server directory. +this method is allowed to be overridden. + +## `mock_default_dir( [$dir] )` + +default implementation for dir. this method should be used in overridden method. + +## `get( $remote_file, [$local_file] )` + +get file from mock FTP server +this method is allowed to be overridden. + +## mock\_default\_get( $remote\_file, \[$local\_file\] ) + +default implementation for get. this method should be used in overridden method. + +## `put( $local_file, [$remote_file] )` + +put a file to mock FTP server +this method is allowed to be overridden. + +## `mock_default_put( $local_file, [$remote_file] )` + +default implementation for put. this method should be used in overridden method. + +## `put_unique( $local_file, [$remote_file] )` + +same as put() but if same file exists in server. rename to unique filename +(in this module, simply add suffix .1(.2, .3...). and suffix is limited to 1024) +this method is allowed to be overridden. + +## `mock_default_put_unique( $local_file, [$remote_file] )` + +default implementation for put\_unique. this method should be used in overridden method. + +## `append( $local_file, [$remote_file] )` + +put a file to mock FTP server. if file already exists, append file contents in server file. +this method is allowed to be overridden. + +## `mock_default_append( $local_file, [$remote_file] )` + +default implementation for append. this method should be used in overridden method. + +## `unique_name()` + +return unique filename when put\_unique() called. +this method is allowed to be overridden. + +## `mock_default_unique_name()` + +default implementation for unique\_name. this method should be used in overridden method. + +## `mdtm( $file )` + +returns file modification time in remote (mock) server. +this method is allowed to be overridden. + +## `mock_default_mdtm()` + +default implementation for mdtm. this method should be used in overridden method. + +## `size( $file )` + +returns filesize in remote (mock) server. +this method is allowed to be overridden. + +## `mock_default_size( $file )` + +default implementation for size. this method should be used in overridden method. + +## `supported( $cmd )` + +supported. +default implementation is 'do nothing'. this method is allowed to be overridden. + +## `mock_default_supported( $cmd )` + +default implementation for supported. this method should be used in overridden method. + +## `hash( [$filehandle_glob_ref], [$bytes_per_hash_mark] )` + +hash. +default implementation is 'do nothing'. this method is allowed to be overridden. + +## `mock_default_hash( [$filehandle_glob_ref], [$bytes_per_hash_mark] )` + +default implementation for hash. this method should be used in overridden method. + +## `feature( $cmd )` + +feature. currently returns list of $cmd. +this method is allowed to be overridden. + +## `mock_default_feature( $cmd )` + +default implementation for feature. this method should be used in overridden method. + +## `nlst( [$dir] )` + +nlst. +default implementation is 'do nothing'. this method is allowed to be overridden. + +## `mock_default_nlst( [$dir] )` + +default implementation for nlst. this method should be used in overridden method. + +## `list( [$dir] )` + +list. +default implementation is 'do nothing'. this method is allowed to be overridden. + +## `mock_default_list( [$dir] )` + +default implementation for list. this method should be used in overridden method. + +## `retr( $file )` + +retr. +default implementation is 'do nothing'. this method is allowed to be overridden. + +## `mock_default_retr($file)` + +default implementation for retr. this method should be used in overridden method. + +## `stor( $file )` + +stor. +default implementation is 'do nothing'. this method is allowed to be overridden. + +## `mock_default_stor( $file )` + +default implementation for stor. this method should be used in overridden method. + +## `stou( $file )` + +stou. currently do\_nothing. + +## `mock_default_stou( $file )` + +default implementation for stor. this method should be used in overridden method. + +## `appe( $file )` + +appe. +default implementation is 'do nothing'. this method is allowed to be overridden. + +## `mock_default_appe( $file )` + +default implementation for appe. this method should be used in overridden method. + +## `port( $port_no )` + +specify data connection to port-mode. + +after called this method, mock\_connection\_mode() returns 'port' and +mock\_port\_no() returns specified $port\_no. + +this method is allowed to be overridden. + +## `mock_default_port( $port_no )` + +default implementation for port. this method should be used in overridden method. + +## `pasv()` + +specify data connection to passive-mode. +after called this method, mock\_connection\_mode() returns 'pasv' and +mock\_port\_no() returns '' + +this method is allowed to be overridden. + +## `mock_default_pasv()` + +default implementation for pasv. this method should be used in overridden method. + +## `pasv_xfer( $src_file, $dest_server, [$dest_file] )` + +pasv\_xfer. +default implementation is 'do nothing'. this method is allowed to be overridden. + +## `mock_default_pasv_xfer( $src_file, $dest_server, [$dest_file] )` + +default implementation for psv\_xfer. this method should be used in overridden method. + +## `pasv_xfer_unique( $src_file, $dest_server, [$dest_file] )` + +pasv\_xfer\_unique. +default implementation is 'do nothing'. this method is allowed to be overridden. + +## `mock_default_pasv_xfer_unique( $src_file, $dest_server, [$dest_file] )` + +default implementation for psv\_xfer\_unique. this method should be used in overridden method. + +## `pasv_wait( $non_pasv_server )` + +pasv\_wait. +default implementation is 'do nothing'. this method is allowed to be overridden. + +## `mock_default_pasv_wait( $non_pasv_server )` + +default implementation for pasv\_wait. this method should be used in overridden method. + +## `abort()` + +abort. +default implementation is 'do nothing'. this method is allowed to be overridden. + +## `mock_default_abort()` + +default implementation for abort. this method should be used in overridden method. + +## `quit()` + +quit. +default implementation is 'do nothing'. this method is allowed to be overridden. + +## `mock_default_quit()` + +default implementation for quit. this method should be used in overridden method. + +## `quot( $cmd, @args )` + +quot. +default implementation is 'do nothing'. this method is allowed to be overridden. + +## `mock_default_quot( $cmd, @args )` + +default implementation for quot. this method should be used in overridden method. + +## `close()` + +close connection mock FTP server. +default implementation is 'do nothing'. this method is allowed to be overridden. + +## `mock_default_close()` + +default implementation for close. this method should be used in overridden method. + +## `message()` + +return messages from mock FTP server +this method is allowed to be overridden. + +## `mock_default_message()` + +default implementation for message. this method should be used in overridden method. + +# AUTHOR + +Takuya Tsuchida <tsucchi at cpan.org> + +# SEE ALSO + +[Net::FTP](https://metacpan.org/pod/Net::FTP) + +# REPOSITORY + +[http://github.com/tsucchi/Test-Mock-Net-FTP](http://github.com/tsucchi/Test-Mock-Net-FTP) + +# COPYRIGHT AND LICENSE + +Copyright (c) 2009-2011 Takuya Tsuchida + +This library is free software; you can redistribute it and/or modify +it under the same terms as Perl itself. diff --git a/cpanfile b/cpanfile new file mode 100644 index 0000000..708d1da --- /dev/null +++ b/cpanfile @@ -0,0 +1,10 @@ +requires 'File::Path', '2.07'; +requires 'File::Slurp'; +requires 'perl', '5.008001'; + +on build => sub { + requires 'Capture::Tiny'; + requires 'ExtUtils::MakeMaker', '6.59'; + requires 'Test::More', '0.94'; + requires 'parent'; +}; diff --git a/lib/Test/Mock/Net/FTP.pm b/lib/Test/Mock/Net/FTP.pm index a6be7dd..26d75ce 100755 --- a/lib/Test/Mock/Net/FTP.pm +++ b/lib/Test/Mock/Net/FTP.pm @@ -12,6 +12,10 @@ use File::Slurp; our $VERSION = '0.02'; +# stopwords for Spellunker + +=for stopwords pasv ascii alloc cwd cdup pwd rmdir dir mkdir ls filesize mdtm nlst retr stor stou appe login quot + =head1 NAME Test::Mock::Net::FTP - Mock Object for Net::FTP @@ -78,7 +82,7 @@ my $cwd_when_prepared; =cut -=head2 mock_prepare( %params ) +=head2 C prepare FTP server in your local filesystem. @@ -90,7 +94,7 @@ sub mock_prepare { $cwd_when_prepared = getcwd(); } -=head2 mock_pwd() +=head2 C mock's current directory @@ -101,7 +105,7 @@ sub mock_pwd { return catdir($self->mock_physical_root, $self->_mock_cwd); } -=head2 mock_physical_root() +=head2 C mock's physical root directory @@ -112,7 +116,7 @@ sub mock_physical_root { return $self->{mock_physical_root}; } -=head2 mock_connection_mode() +=head2 C return current connection mode (port or pasv) @@ -124,7 +128,7 @@ sub mock_connection_mode { return $self->{mock_connection_mode}; } -=head2 mock_port_no() +=head2 C return current port no @@ -136,7 +140,7 @@ sub mock_port_no { return $self->{mock_port_no}; } -=head2 mock_transfer_mode() +=head2 C return current transfer mode(ascii or binary) @@ -148,7 +152,7 @@ sub mock_transfer_mode { return $self->{mock_transfer_mode}; } -=head2 mock_command_history() +=head2 C return command history @@ -172,7 +176,7 @@ sub _push_mock_command_history { push @{ $self->{mock_command_history} }, [$method_name, @args]; } -=head2 mock_clear_command_history() +=head2 C clear command history @@ -185,7 +189,7 @@ sub mock_clear_command_history { } -=head2 new( $host, %options ) +=head2 C create new instance @@ -219,7 +223,7 @@ sub _connection_mode_and_port_no { return ($connection_mode, $port_no); } -=head2 login( $user, $password ) +=head2 C login mock FTP server. this method IS NOT allowed to be overridden. @@ -255,7 +259,7 @@ sub _mock_login_auth { return $server_password eq $pass; } -=head2 authorize( [$auth, [$resp]] ) +=head2 C authorize. default implementation is 'do nothing'. this method is allowed to be overridden. @@ -263,9 +267,9 @@ default implementation is 'do nothing'. this method is allowed to be overridden. =cut -=head2 mock_default_authorize( [$auth, [$resp]] ) +=head2 C -default implementation for authorize. this method sholud be used in overridden method. +default implementation for authorize. this method should be used in overridden method. =cut @@ -274,7 +278,7 @@ sub mock_default_authorize { return 1; } -=head2 site( @args ) +=head2 C execute SITE command. default implementation is 'do nothing'. this method is allowed to be overridden. @@ -282,9 +286,9 @@ default implementation is 'do nothing'. this method is allowed to be overridden. =cut -=head2 mock_default_site( @args ) +=head2 C -default implementation for site. this method sholud be used in overridden method. +default implementation for site. this method should be used in overridden method. =cut @@ -293,18 +297,18 @@ sub mock_default_site { return 1; } -=head2 ascii() +=head2 C enter ascii mode. mock_transfer_mode() returns 'ascii'. -this methos is allowed to be overridden. +this method is allowed to be overridden. =cut -=head2 mock_default_ascii() +=head2 C -default implementation for ascii. this method sholud be used in overridden method. +default implementation for ascii. this method should be used in overridden method. =cut @@ -313,18 +317,18 @@ sub mock_default_ascii { $self->{mock_transfer_mode} = 'ascii'; } -=head2 binary() +=head2 C enter binary mode. mock_transfer_mode() returns 'binary'. -this methos is allowed to be overridden. +this method is allowed to be overridden. =cut -=head2 mock_default_binary() +=head2 C -default implementation for binary. this method sholud be used in overridden method. +default implementation for binary. this method should be used in overridden method. =cut @@ -333,17 +337,17 @@ sub mock_default_binary { $self->{mock_transfer_mode} = 'binary'; } -=head2 rename($oldname, $newname) +=head2 C rename remote file. -this methos is allowed to be overridden. +this method is allowed to be overridden. =cut -=head2 mock_default_rename($oldname, $newname) +=head2 C -default implementation for rename. this method sholud be used in overridden method. +default implementation for rename. this method should be used in overridden method. =cut @@ -355,17 +359,17 @@ sub mock_default_rename { } } -=head2 delete( $filename ) +=head2 C delete remote file. -this methos is allowed to be overridden. +this method is allowed to be overridden. =cut -=head2 mock_default_delete( $filename ) +=head2 C -default implementation for delete. this method sholud be used in overridden method. +default implementation for delete. this method should be used in overridden method. =cut @@ -378,17 +382,17 @@ sub mock_default_delete { } } -=head2 cwd( $dir ) +=head2 C change (mock) server current directory -this methos is allowed to be overridden. +this method is allowed to be overridden. =cut -=head2 mock_default_cwd( $dir ) +=head2 C -default implementation for cwd. this method sholud be used in overridden method. +default implementation for cwd. this method should be used in overridden method. =cut @@ -413,17 +417,17 @@ sub mock_default_cwd { return $self->_mock_check_pwd($backup_cwd); } -=head2 cdup() +=head2 C change (mock) server directory to parent -this methos is allowed to be overridden. +this method is allowed to be overridden. =cut -=head2 mock_default_cdup() +=head2 C -default implementation for cdup. this method sholud be used in overridden method. +default implementation for cdup. this method should be used in overridden method. =cut @@ -434,17 +438,17 @@ sub mock_default_cdup { return $self->_mock_check_pwd($backup_cwd); } -=head2 pwd() +=head2 C return (mock) server current directory -this methos is allowed to be overridden. +this method is allowed to be overridden. =cut -=head2 mock_default_pwd() +=head2 C -default implementation for pwd. this method sholud be used in overridden method. +default implementation for pwd. this method should be used in overridden method. =cut @@ -476,17 +480,17 @@ sub _mock_check_pwd { return 1; } -=head2 restart( $where ) +=head2 C restart. currently do_nothing -this methos is allowed to be overridden. +this method is allowed to be overridden. =cut -=head2 mock_default_restart( $where ) +=head2 C -default implementation for restart. this method sholud be used in overridden method. +default implementation for restart. this method should be used in overridden method. =cut @@ -495,17 +499,17 @@ sub mock_default_restart { return 1; } -=head2 rmdir( $dirname, $recursive_bool ) +=head2 C rmdir to remove (mock) server. when $recursive_bool is true, dir is recursively removed. -this methos is allowed to be overridden. +this method is allowed to be overridden. =cut -=head2 mock_default_rmdir( $dirname, $recursive_bool ) +=head2 C -default implementation for rmdir. this method sholud be used in overridden method. +default implementation for rmdir. this method should be used in overridden method. =cut @@ -525,17 +529,17 @@ sub mock_default_rmdir { } } -=head2 mkdir( $dirname, $recursive_bool ) +=head2 C mkdir to remove (mock) server. when $recursive_bool is true, dir is recursively create. -this methos is allowed to be overridden. +this method is allowed to be overridden. =cut -=head2 mock_default_mkdir( $dirname, $recursive_bool ) +=head2 C -default implementation for mkdir. this method sholud be used in overridden method. +default implementation for mkdir. this method should be used in overridden method. =cut @@ -555,7 +559,7 @@ sub mock_default_mkdir { } } -=head2 alloc( $size, [$record_size] ) +=head2 C alloc. default implementation is 'do nothing'. this method is allowed to be overridden. @@ -563,9 +567,9 @@ default implementation is 'do nothing'. this method is allowed to be overridden. =cut -=head2 mock_default_alloc( $size, [$record_size] ) +=head2 C -default implementation for alloc. this method sholud be used in overridden method. +default implementation for alloc. this method should be used in overridden method. =cut @@ -574,17 +578,17 @@ sub mock_default_alloc { return 1; } -=head2 ls( [$dir] ) +=head2 C list file(s) in server directory. -this methos is allowed to be overridden. +this method is allowed to be overridden. =cut -=head2 mock_default_ls( [$dir] ) +=head2 C -default implementation for ls. this method sholud be used in overridden method. +default implementation for ls. this method should be used in overridden method. =cut @@ -607,17 +611,17 @@ sub _list_files { return @files; } -=head2 dir( [$dir] ) +=head2 C list file(s) with detail information(ex. filesize) in server directory. -this methos is allowed to be overridden. +this method is allowed to be overridden. =cut -=head2 mock_default_dir( [$dir] ) +=head2 C -default implementation for dir. this method sholud be used in overridden method. +default implementation for dir. this method should be used in overridden method. =cut @@ -631,17 +635,17 @@ sub mock_default_dir { return \@dir; } -=head2 get( $remote_file, [$local_file] ) +=head2 C get file from mock FTP server -this methos is allowed to be overridden. +this method is allowed to be overridden. =cut =head2 mock_default_get( $remote_file, [$local_file] ) -default implementation for get. this method sholud be used in overridden method. +default implementation for get. this method should be used in overridden method. =cut @@ -658,17 +662,17 @@ sub mock_default_get { } -=head2 put( $local_file, [$remote_file] ) +=head2 C put a file to mock FTP server -this methos is allowed to be overridden. +this method is allowed to be overridden. =cut -=head2 mock_default_put( $local_file, [$remote_file] ) +=head2 C -default implementation for put. this method sholud be used in overridden method. +default implementation for put. this method should be used in overridden method. =cut @@ -684,11 +688,11 @@ sub mock_default_put { return $remote_file; } -=head2 put_unique( $local_file, [$remote_file] ) +=head2 C same as put() but if same file exists in server. rename to unique filename (in this module, simply add suffix .1(.2, .3...). and suffix is limited to 1024) -this methos is allowed to be overridden. +this method is allowed to be overridden. =cut @@ -706,9 +710,9 @@ sub _unique_new_name { return $newfile; } -=head2 mock_default_put_unique( $local_file, [$remote_file] ) +=head2 C -default implementation for put_unique. this method sholud be used in overridden method. +default implementation for put_unique. this method should be used in overridden method. =cut @@ -727,17 +731,17 @@ sub mock_default_put_unique { } -=head2 append( $local_file, [$remote_file] ) +=head2 C put a file to mock FTP server. if file already exists, append file contents in server file. -this methos is allowed to be overridden. +this method is allowed to be overridden. =cut -=head2 mock_default_append( $local_file, [$remote_file] ) +=head2 C -default implementation for append. this method sholud be used in overridden method. +default implementation for append. this method should be used in overridden method. =cut @@ -753,17 +757,17 @@ sub mock_default_append { write_file( $self->_abs_remote($remote_file), { append => 1 }, $local_contents); } -=head2 unique_name() +=head2 C return unique filename when put_unique() called. -this methos is allowed to be overridden. +this method is allowed to be overridden. =cut -=head2 mock_default_unique_name() +=head2 C -default implementation for unique_name. this method sholud be used in overridden method. +default implementation for unique_name. this method should be used in overridden method. =cut @@ -773,16 +777,16 @@ sub mock_default_unique_name { return $self->{mock_unique_name}; } -=head2 mdtm( $file ) +=head2 C returns file modification time in remote (mock) server. -this methos is allowed to be overridden. +this method is allowed to be overridden. =cut -=head2 mock_default_mdtm() +=head2 C -default implementation for mdtm. this method sholud be used in overridden method. +default implementation for mdtm. this method should be used in overridden method. =cut @@ -792,17 +796,17 @@ sub mock_default_mdtm { return $mdtm; } -=head2 size( $file ) +=head2 C returns filesize in remote (mock) server. -this methos is allowed to be overridden. +this method is allowed to be overridden. =cut -=head2 mock_default_size( $file ) +=head2 C -default implementation for size. this method sholud be used in overridden method. +default implementation for size. this method should be used in overridden method. =cut @@ -812,7 +816,7 @@ sub mock_default_size { return $size; } -=head2 supported( $cmd ) +=head2 C supported. default implementation is 'do nothing'. this method is allowed to be overridden. @@ -820,9 +824,9 @@ default implementation is 'do nothing'. this method is allowed to be overridden. =cut -=head2 mock_default_supported( $cmd ) +=head2 C -default implementation for supported. this method sholud be used in overridden method. +default implementation for supported. this method should be used in overridden method. =cut @@ -832,7 +836,7 @@ sub mock_default_supported { } -=head2 hash( [$filehandle_glob_ref], [$bytes_per_hash_mark] ) +=head2 C hash. default implementation is 'do nothing'. this method is allowed to be overridden. @@ -840,9 +844,9 @@ default implementation is 'do nothing'. this method is allowed to be overridden. =cut -=head2 mock_default_hash( [$filehandle_glob_ref], [$bytes_per_hash_mark] ) +=head2 C -default implementation for hash. this method sholud be used in overridden method. +default implementation for hash. this method should be used in overridden method. =cut @@ -852,17 +856,17 @@ sub mock_default_hash { } -=head2 feature( $cmd ) +=head2 C -reature. currently returns list of $cmd. +feature. currently returns list of $cmd. this method is allowed to be overridden. =cut -=head2 mock_default_feature( $cmd ) +=head2 C -default implementation for feature. this method sholud be used in overridden method. +default implementation for feature. this method should be used in overridden method. =cut @@ -871,16 +875,16 @@ sub mock_default_feature { return ($cmd); } -=head2 nlst( [$dir] ) +=head2 C nlst. default implementation is 'do nothing'. this method is allowed to be overridden. =cut -=head2 mock_default_nlst( [$dir] ) +=head2 C -default implementation for nlst. this method sholud be used in overridden method. +default implementation for nlst. this method should be used in overridden method. =cut @@ -889,7 +893,7 @@ sub mock_default_nlst { return 1; } -=head2 list( [$dir] ) +=head2 C list. default implementation is 'do nothing'. this method is allowed to be overridden. @@ -897,9 +901,9 @@ default implementation is 'do nothing'. this method is allowed to be overridden. =cut -=head2 mock_default_list( [$dir] ) +=head2 C -default implementation for list. this method sholud be used in overridden method. +default implementation for list. this method should be used in overridden method. =cut @@ -908,7 +912,7 @@ sub mock_default_list { return 1; } -=head2 retr( $file ) +=head2 C retr. default implementation is 'do nothing'. this method is allowed to be overridden. @@ -916,9 +920,9 @@ default implementation is 'do nothing'. this method is allowed to be overridden. =cut -=head2 mock_default_retr($file) +=head2 C -default implementation for retr. this method sholud be used in overridden method. +default implementation for retr. this method should be used in overridden method. =cut @@ -927,7 +931,7 @@ sub mock_default_retr { return 1; } -=head2 stor( $file ) +=head2 C stor. default implementation is 'do nothing'. this method is allowed to be overridden. @@ -935,9 +939,9 @@ default implementation is 'do nothing'. this method is allowed to be overridden. =cut -=head2 mock_default_stor( $file ) +=head2 C -default implementation for stor. this method sholud be used in overridden method. +default implementation for stor. this method should be used in overridden method. =cut @@ -946,16 +950,16 @@ sub mock_default_stor { return 1; } -=head2 stou( $file ) +=head2 C stou. currently do_nothing. =cut -=head2 mock_default_stou( $file ) +=head2 C -default implementation for stor. this method sholud be used in overridden method. +default implementation for stor. this method should be used in overridden method. =cut @@ -964,7 +968,7 @@ sub mock_default_stou { return 1; } -=head2 appe( $file ) +=head2 C appe. default implementation is 'do nothing'. this method is allowed to be overridden. @@ -972,9 +976,9 @@ default implementation is 'do nothing'. this method is allowed to be overridden. =cut -=head2 mock_default_appe( $file ) +=head2 C -default implementation for appe. this method sholud be used in overridden method. +default implementation for appe. this method should be used in overridden method. =cut @@ -983,21 +987,21 @@ sub mock_default_appe { return 1; } -=head2 port( $port_no ) +=head2 C specify data connection to port-mode. after called this method, mock_connection_mode() returns 'port' and mock_port_no() returns specified $port_no. -this methos is allowed to be overridden. +this method is allowed to be overridden. =cut -=head2 mock_default_port( $port_no ) +=head2 C -default implementation for port. this method sholud be used in overridden method. +default implementation for port. this method should be used in overridden method. =cut @@ -1007,20 +1011,20 @@ sub mock_default_port { $self->{mock_port_no} = $port_no; } -=head2 pasv() +=head2 C specify data connection to passive-mode. after called this method, mock_connection_mode() returns 'pasv' and mock_port_no() returns '' -this methos is allowed to be overridden. +this method is allowed to be overridden. =cut -=head2 mock_default_pasv() +=head2 C -default implementation for pasv. this method sholud be used in overridden method. +default implementation for pasv. this method should be used in overridden method. =cut @@ -1030,7 +1034,7 @@ sub mock_default_pasv { $self->{mock_port_no} = ''; } -=head2 pasv_xfer( $src_file, $dest_server, [$dest_file] ) +=head2 C pasv_xfer. default implementation is 'do nothing'. this method is allowed to be overridden. @@ -1038,9 +1042,9 @@ default implementation is 'do nothing'. this method is allowed to be overridden. =cut -=head2 mock_default_pasv_xfer( $src_file, $dest_server, [$dest_file] ) +=head2 C -default implementation for psv_xfer. this method sholud be used in overridden method. +default implementation for psv_xfer. this method should be used in overridden method. =cut @@ -1050,7 +1054,7 @@ sub mock_default_pasv_xfer { } -=head2 pasv_xfer_unique( $src_file, $dest_server, [$dest_file] ) +=head2 C pasv_xfer_unique. default implementation is 'do nothing'. this method is allowed to be overridden. @@ -1058,9 +1062,9 @@ default implementation is 'do nothing'. this method is allowed to be overridden. =cut -=head2 mock_default_pasv_xfer_unique( $src_file, $dest_server, [$dest_file] ) +=head2 C -default implementation for psv_xfer_unique. this method sholud be used in overridden method. +default implementation for psv_xfer_unique. this method should be used in overridden method. =cut @@ -1069,7 +1073,7 @@ sub mock_default_pasv_xfer_unique { return 1; } -=head2 pasv_wait( $non_pasv_server ) +=head2 C pasv_wait. default implementation is 'do nothing'. this method is allowed to be overridden. @@ -1077,9 +1081,9 @@ default implementation is 'do nothing'. this method is allowed to be overridden. =cut -=head2 mock_default_pasv_wait( $non_pasv_server ) +=head2 C -default implementation for pasv_wait. this method sholud be used in overridden method. +default implementation for pasv_wait. this method should be used in overridden method. =cut @@ -1089,7 +1093,7 @@ sub mock_default_pasv_wait { } -=head2 abort() +=head2 C abort. default implementation is 'do nothing'. this method is allowed to be overridden. @@ -1097,9 +1101,9 @@ default implementation is 'do nothing'. this method is allowed to be overridden. =cut -=head2 mock_default_abort() +=head2 C -default implementation for abort. this method sholud be used in overridden method. +default implementation for abort. this method should be used in overridden method. =cut @@ -1108,7 +1112,7 @@ sub mock_default_abort { return 1; } -=head2 quit() +=head2 C quit. default implementation is 'do nothing'. this method is allowed to be overridden. @@ -1116,9 +1120,9 @@ default implementation is 'do nothing'. this method is allowed to be overridden. =cut -=head2 mock_default_quit() +=head2 C -default implementation for quit. this method sholud be used in overridden method. +default implementation for quit. this method should be used in overridden method. =cut @@ -1128,7 +1132,7 @@ sub mock_default_quit { } -=head2 quot( $cmd, @args ) +=head2 C quot. default implementation is 'do nothing'. this method is allowed to be overridden. @@ -1136,9 +1140,9 @@ default implementation is 'do nothing'. this method is allowed to be overridden. =cut -=head2 mock_default_quot( $cmd, @args ) +=head2 C -default implementation for quot. this method sholud be used in overridden method. +default implementation for quot. this method should be used in overridden method. =cut @@ -1148,7 +1152,7 @@ sub mock_default_quot { } -=head2 close() +=head2 C close connection mock FTP server. default implementation is 'do nothing'. this method is allowed to be overridden. @@ -1156,9 +1160,9 @@ default implementation is 'do nothing'. this method is allowed to be overridden. =cut -=head2 mock_default_close() +=head2 C -default implementation for close. this method sholud be used in overridden method. +default implementation for close. this method should be used in overridden method. =cut @@ -1205,7 +1209,7 @@ sub _abs_local { return catfile($local_dir, basename($local_path)); } -=head2 message() +=head2 C return messages from mock FTP server this method is allowed to be overridden. @@ -1222,9 +1226,9 @@ sub message { return $self->mock_default_message(); } -=head2 mock_default_message() +=head2 C -default implementation for message. this method sholud be used in overridden method. +default implementation for message. this method should be used in overridden method. =cut diff --git a/xt/manifest.t b/xt/manifest.t deleted file mode 100644 index 2d67038..0000000 --- a/xt/manifest.t +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/perl -use strict; -use warnings; - -use Test::CheckManifest; - -ok_manifest({ filter => [qr/\AMYMETA\./ms] }); diff --git a/xt/module_used.t b/xt/module_used.t deleted file mode 100755 index b6b78a3..0000000 --- a/xt/module_used.t +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/perl -use strict; -use warnings; -use Test::Module::Used; -my $used = Test::Module::Used->new(); -$used->ok; diff --git a/xt/perlcritic.t b/xt/perlcritic.t deleted file mode 100755 index 0b73f0c..0000000 --- a/xt/perlcritic.t +++ /dev/null @@ -1,7 +0,0 @@ -use strict; -use Test::More; - -eval { require Test::Perl::Critic; Test::Perl::Critic->import(-profile => "xt/perlcriticrc") }; -plan skip_all => "Test::Perl::Critic is not installed." if $@; - -all_critic_ok("lib"); diff --git a/xt/perlcriticrc b/xt/perlcriticrc deleted file mode 100644 index e69de29..0000000 diff --git a/xt/pod.t b/xt/pod.t deleted file mode 100755 index e7cae75..0000000 --- a/xt/pod.t +++ /dev/null @@ -1,4 +0,0 @@ -use Test::More; -eval "use Test::Pod"; -plan skip_all => "Test::Pod required for testing POD" if $@; -all_pod_files_ok(); diff --git a/xt/pod_coverage.t b/xt/pod_coverage.t deleted file mode 100755 index a0b0fa9..0000000 --- a/xt/pod_coverage.t +++ /dev/null @@ -1,4 +0,0 @@ -use Test::More; -eval "use Test::Pod::Coverage"; -plan skip_all => "Test::Pod::Coverage required for testing POD coverage" if $@; -all_pod_coverage_ok(); diff --git a/xt/synopsis.t b/xt/synopsis.t deleted file mode 100755 index e1a5a8f..0000000 --- a/xt/synopsis.t +++ /dev/null @@ -1,2 +0,0 @@ -use Test::Synopsis; -all_synopsis_ok();