Browse files

* mv devel -> cpanplus-devel

git-svn-id: http://oss.dwim.org/cpanplus-devel@757 4dccba1d-3c1b-0410-aec4-feb514a8dabc
  • Loading branch information...
0 parents commit 1b649d3e15a26640e0ad902916058ba31786ec4d Jos Boumans committed Aug 17, 2006
Showing with 35,886 additions and 0 deletions.
  1. +545 −0 ChangeLog
  2. +4,709 −0 Changes
  3. +144 −0 MANIFEST
  4. +32 −0 MANIFEST.SKIP
  5. +13 −0 META.yml
  6. +227 −0 Makefile.PL
  7. +125 −0 README
  8. +63 −0 TODO
  9. +595 −0 bin/cpan2dist
  10. +125 −0 bin/cpanp
  11. +119 −0 bin/cpanp-boxed
  12. +119 −0 dev-bin/copy-inc.pl
  13. +69 −0 dev-bin/sandbox-test.pl
  14. +37 −0 dev-bin/update-version.pl
  15. +169 −0 inc/Module/Install.pm
  16. +54 −0 inc/Module/Install/Base.pm
  17. +38 −0 inc/Module/Install/Can.pm
  18. +86 −0 inc/Module/Install/Fetch.pm
  19. +143 −0 inc/Module/Install/Makefile.pm
  20. +187 −0 inc/Module/Install/Metadata.pm
  21. +43 −0 inc/Module/Install/Scripts.pm
  22. +63 −0 inc/Module/Install/Win32.pm
  23. +36 −0 inc/Module/Install/WriteAll.pm
  24. +1,044 −0 inc/bundle/Archive/Extract.pm
  25. +1,683 −0 inc/bundle/Archive/Tar.pm
  26. +77 −0 inc/bundle/Archive/Tar/Constant.pm
  27. +586 −0 inc/bundle/Archive/Tar/File.pm
  28. +629 −0 inc/bundle/Class/Inspector.pm
  29. +103 −0 inc/bundle/Devel/InnerPackage.pm
  30. +925 −0 inc/bundle/File/Fetch.pm
  31. +52 −0 inc/bundle/File/Fetch/Item.pm
  32. +322 −0 inc/bundle/File/Spec.pm
  33. +105 −0 inc/bundle/File/Spec/Cygwin.pm
  34. +77 −0 inc/bundle/File/Spec/Epoc.pm
  35. +109 −0 inc/bundle/File/Spec/Functions.pm
  36. +780 −0 inc/bundle/File/Spec/Mac.pm
  37. +272 −0 inc/bundle/File/Spec/OS2.pm
  38. +517 −0 inc/bundle/File/Spec/Unix.pm
  39. +531 −0 inc/bundle/File/Spec/VMS.pm
  40. +337 −0 inc/bundle/File/Spec/Win32.pm
  41. +551 −0 inc/bundle/IO/String.pm
  42. +655 −0 inc/bundle/IO/Zlib.pm
  43. +580 −0 inc/bundle/IPC/Cmd.pm
  44. +4,476 −0 inc/bundle/IPC/Run.pm
  45. +311 −0 inc/bundle/IPC/Run/Debug.pm
  46. +562 −0 inc/bundle/IPC/Run/IO.pm
  47. +688 −0 inc/bundle/IPC/Run/Timer.pm
  48. +481 −0 inc/bundle/IPC/Run/Win32Helper.pm
  49. +556 −0 inc/bundle/IPC/Run/Win32IO.pm
  50. +162 −0 inc/bundle/IPC/Run/Win32Pump.pm
  51. +331 −0 inc/bundle/Locale/Maketext/Simple.pm
  52. +600 −0 inc/bundle/Log/Message.pm
  53. +197 −0 inc/bundle/Log/Message/Config.pm
  54. +191 −0 inc/bundle/Log/Message/Handlers.pm
  55. +192 −0 inc/bundle/Log/Message/Item.pm
  56. +293 −0 inc/bundle/Log/Message/Simple.pm
  57. +7,025 −0 inc/bundle/Module/CoreList.pm
  58. +173 −0 inc/bundle/Module/Load.pm
  59. +528 −0 inc/bundle/Module/Load/Conditional.pm
  60. +144 −0 inc/bundle/Module/Loaded.pm
  61. +346 −0 inc/bundle/Module/Pluggable.pm
  62. +285 −0 inc/bundle/Module/Pluggable/Object.pm
  63. +561 −0 inc/bundle/Object/Accessor.pm
  64. +108 −0 inc/bundle/Package/Constants.pm
Sorry, we could not display the entire diff because it was too big.
545 ChangeLog
@@ -0,0 +1,545 @@
+Changes for 0.073_01 Wed Aug 2 15:40:38 CEST 2006
+=====================================================
+
+* 'install Bundle::CPANPLUS::Dependencies' should
+ now work properly from cpanp-boxed, even without
+ a --force option
+* Up requirements to more recent versions of among
+ others Archive::Extract, CPANPLUS::Dist::Build,
+ File::Fetch & Module::Load::Conditional.
+* Update bundled modules for cpanp-boxed
+* Don't change versions of bundled modules, this
+ breaks 'use Foo 1.0' statements in our dependencies
+ Uptodate check is now done with a new feature in
+ Module::Load::Conditional that can check %INC.
+* Rework cpanp-boxed to deal better with bundled
+ modules and their uptodateness
+* Move module::pluggable code to runtime rather than
+ compiletime this makes 'require CPANPLUS' not run
+ around the FS looking for config files until they
+ are needed
+* Address #20737 (Failed to Setup CLI Programs with
+ Arguments) where the interactive configuration
+ wouldn't let you specify options to CLI programs
+* Address #20640: Always Sent 'pass' Report With
+ 'force' => 1. Test reports are now marked as
+ 'fail' when they fail, even when 'force' is true.
+ * sent mail to module-build@perl.org with the
+ patch for C::D::Build to have the same behaviour
+
+Changes for 0.072 Fri Jun 23 18:17:00 CEST 2006
+=====================================================
+
+* This is a major release of CPANPLUS. It includes
+ all the changes from release 0.070_01, including
+ the following changes made after the beta was
+ released:
+* The POD text of CPANPLUS.pm has been revamped to
+ be more of a guide than a technical reference.
+* $module->status is now lazily initialized, lowering
+ overall RAM usage and startup time at the cost of
+ a runtime penalty. Overall, this improves performance
+ significantly.
+* Address #20005: CPANPLUS does not check size of
+ downloaded module this adds code that checks if
+ the downloaded size is equal to the size specified
+ by the checksums file
+* Fix file fetching testing issue on Win32 (#18702)
+
+Changes for 0.070_01 Mon Jun 19 17:23:38 CEST 2006
+=====================================================
+* This is a major beta release of CPANPLUS, revamping
+ the configuration mechanism. From now on, CPANPLUS
+ no longer requires a setup to be run at installation
+ time and should work 'out of the box' on most
+ systems using a pre-built configuration file.
+* CPANPLUS now supports stacked configuration files:
+ * CPANPLUS::Config is the heuristic config file
+ which will always be installed sytemwide.
+ * CPANPLUS::Config::System is the systemwide
+ config file which can be installed by an admin
+ in your perl installation path. This file will
+ be available for everyone and override settings
+ from CPANPLUS::Config
+ * CPANPLUS::Config::User is the per-user config
+ which can be installed by any user in their
+ $HOME/.cpanplus directory. This file will be
+ available for the user only and override settings
+ from CPANPLUS::Config and CPANPLUS::Config::System
+ * $HOME/.cpanplus/lib gets added automatically to your
+ config search path.
+ * All configuration types can be created and saved
+ via the interactive Setup. You can invoke it from
+ the default shell as follows:
+
+ CPAN Terminal> s conf user # per user config
+ CPAN Terminal> s conf system # system wide config
+
+ or during installation time like this:
+
+ $ perl Makefile.PL --setup
+* Makefile.PL has been stripped from all it's magic
+* Setup is now menu based for a better user experience.
+* make loading plugin configs work, with priority
+ for system & user configs before the rest
+* address #19438: Key 'file' is of invalid type
+ Turns out it's a bug in Module::Build, reported as
+ #19741, which creates a 'Build' file when running
+ 'perl Makefile.PL' on a M::B generated Makefile.PL
+ Add a patch that detects this situation and informs
+ the user
+* Demand Test::Harness 2.62 to be installed due to
+ bug #19505 in earlier versions
+* IPC::Run is now required for Win32 & Cygwin
+* use $Config{path_ext} instead of hardcoded ':' to
+ seperate $PATH in cpanp-boxed
+* Small test changes in 20.t to make sure no test output
+ counter mismatches occur.
+* remove all 'clever' code from CPANPLUS::inc, as the
+ new config methodology makes it obsolete. Basic
+ functionality is retained only for backwards compat.
+* remove CPANPLUS config version checks back and forth
+ -- should work without from now on
+* make cpanp-boxed work from others dirs than just bin/..
+* make use of package::constants
+* Make sure Bundle-Foo.tgz also gets recognized as bundle
+* Data::Dumper indenting style set to '1' in default shell
+* make constants for libdir etc accept a list, not just
+ a single param
+* address #19738: bogus entry in @INC
+* address: #18270: cpan2dist --archive breaks with
+ relative path
+* address #18121: invalid value for 'checksum_value'
+ which showed that old .stored files can mess up CPANPLUS
+ untill they are rebuilt. From now on, Makefile.PL will
+ delete old .stored files when installing a new version
+* mark all the versions of inc/ modules as -1, so we
+ are always 'not uptodate' when asked to install them
+* remove old api that lets you set values in configure
+ object via backend->new or configure->new, which was
+ impractical and unused.
+* updated our bugreporting address to point at the
+ rt.cpan.org queue.
+* Clean up source tree from obsolete files
+* Have 'make clean' clean up all the generated files
+
+
+
+
+
+Changes for 0.061 Wed Mar 15 16:09:03 CET 2006
+=====================================================
+
+* The template for the original configuration got shipped
+ with a few default values that will not work on every
+ system. Anyone who manually configures should not be
+ affected, but the automated configuration may draw
+ the wrong conclusion.
+ For safetey sake, and to minimize possible issues for
+ users, this release ships a template with sensible
+ cross-platform defaults again
+
+Changes for 0.060 Fri Mar 10 17:19:06 CET 2006
+=====================================================
+
+* This is a major release of CPANPLUS, supporting
+ 3rd party package creation and shell plugins
+* include bin/cpanp-boxed for a bootstrapped version of cpanp;
+ this allows you to use cpanp without configuring/installing
+ anything.
+* Include clear installation instructions in the README, beyond
+ the simple 'perl Makefile.PL; make; make install'
+* save sources to disk after creating the trees, not at end of script
+ this should speed up closing the application, at a one time overhead
+ when parsing the sourcefiles
+* add more diagnostics on updating source files
+* Make CPANPLUS::inc redundant -- bundled modules required for boot
+ strapping no longer get installed.
+* Update bundled modules for bootstrapping to most recent versions
+* Various tweaks to Makefile.PL to make installing friendlier
+* perl Makefile.PL AUTOINSTALL=1 now no longer requires any user
+ input (just like $ENV{PERL_MM_USE_DEFAULT} already did).
+* Filter out .meta files from the CHECKSUMS file
+* apply patch from yperl@club-internet.fr to stop Makefile.PL
+ from dying if user doesn't want to configure now, and doesn't
+ have an existing config.pm
+* fix typo introduced in 0.052 that broke Classic.pm
+* fix cpan2dist's ungraceful dying if the dist object was undefined
+ (fixes part of [#17568] bad diagnostics from checksum errors/cpan2dist)
+* address #17655: [WISHLIST] Report bad signature send out a fail test
+ report when a signature check fails
+* address #17984: (Two Problems in Makefile.PL)
+
+Changes for 0.059_01 Sat Oct 15 14:20:16 CEST 2005
+=====================================================
+
+* This is a development release supporting 3rd party
+ package creation and shell plugins
+* Add new callback to filter prereqs
+* Add plugin support to the default shell
+* Add a howto on writing plugins:
+ CPANPLUS::Shell::Default::Plugins::HOWTO
+* Set Data::Dumper::Indent to 1 in the default shell
+* Document --update_source switch in the default shell
+* Add 's mirrors' to the default shell documentation
+* Improve Internals.pm documentation
+* Add basic documentation to undocumented functions
+ in Utils.pm
+* Implement proper 'ignore' option for cpan2dist and
+ rename old 'ignore' to 'ban'
+* Allow the --*list options to cpan2dist to be given
+ more than once.
+* Fix typo in cpan2dist that wasn't setting the makefile
+ preference correctly
+* Add an option to redirect output to cpan2dist
+* Add alarm functionality to cpan2dist
+* The 'sudo' setting is now being defaulted to its
+ previous setting during setup
+* Attempt to show what previous config was found during
+ setup if possible.
+* Disable checksums fetch when downloading readme
+* Store found prereqs in the dist object when we can
+* Use constants for strings where possible.
+* Determine installer type in CPANPLUS::Module::dist()
+ if we haven't already
+* Support both cp_error/error and cp_msg/msg as
+ diagnostic functions
+* When extracting files, make sure +x is set on directories
+* When extracting files, store their names
+* Renamed vcmp() to _vcmp() to mark it's privateness.
+* Add a seperate method in Dist.pm to check if a prereq
+ has been satisfied, so modules subclassing Dist.pm may
+ override it (thanks to Ken Williams).
+* Add an 'add_to_includepath' method to Module.pm, so
+ modules can add their build paths to @INC.
+* Module::Build's 'perl version too low' diagnostic changed
+ between releases. Make sure our test reporter understands
+ both (fixes [#15197], thanks to Barbie)
+* t/01_CPANPLUS-Configure.t doesn't load CPANPLUS::Config
+ directly anymore, as there may be an %ENV setting
+* Fix t/05_CPANPLUS-Internals-Fetch.t to compensate
+ when being on non-unixy platforms [#1455]
+ pointing to the config file instead
+* Update bundled modules to their latest version
+
+
+Changes for 0.0561 Sat Aug 20 19:57:15 CEST 2005
+=====================================================
+
+* This release holds no functional changes over 0.056
+* The META.yml did not get included in this distribution,
+ meaning the PAUSE indexer indexed our include modules as
+ well.
+
+
+Changes for 0.056 Sat Aug 20 13:31:17 CEST 2005
+=====================================================
+
+* This release is identical to 0.056_01 but no longer
+ marked as 'development release'.
+
+Changes for 0.056_01 Thu Aug 18 16:26:52 CEST 2005
+=====================================================
+
+* This is a development release testing the splitting
+ off of CPANPLUS::Dist::Buid into it's own package.
+* CPANPLUS::Dist::Deb got branched into it's own package
+* Make 'i URI' work from the default shell, enabling commands
+ like 'i http://example.com/module.tgz'. parse_module()
+ understands this as well (for API users) -- #11479
+* Add test cases for lack of CPANPLUS::Dist::Deb
+* Add new test tarballs that provide the simples possible
+ distributions
+* Add prereq to CPANPLUS::Dist::Deb if the user prefers
+ to use Build.PL over Makefile.PL
+* Add a depencendency on Win32::Process on Win32 (bundled
+ with AS perl, needed by IPC::Run)
+* Quell warnings about empty prerequisite lists (#13111)
+* Quell warnings about beta-versions being non-numeric (#14106)
+* Platform dependant modules were /always/ getting an NA grade
+ regardless whether they failed or not (#13224)
+* Config keys are now sorted when printed in the default shell
+ (as requested by Tux)
+* Extracted files now only get +w for the owner, not '755',
+ as this interferes with some modules test suite ([#13358])
+* Some modules uses module_name_version.ext rather than the
+ usual module-name-version.ext. CPANPLUS now parses both
+ correctly (#13367)
+* 's mirrors' in the default shell now lists your mirrors.
+ To alter them you must still edit the config using 's edit'
+* Buffers are now autoflushed while invoking 'perl Makefile.PL';
+ Modules that asked questions during interactive install
+ sometimes had their output held back in the buffer. Since not
+ all modules do $|++ in their Makefile.PL, we do it for them
+ (#12121)
+* The diagnostic reporting functions 'msg' and 'error' from
+ CPANPLUS::Error got renamed to 'cp_msg' and 'cp_error'
+ respectively, to avoid conflicts with Log::Message::Simple.
+ (This only affects API developers).
+* All bundled modules are updated to their most recent version.
+
+
+Changes for 0.055 Sat Jun 4 15:53:37 CEST 2005
+=====================================================
+
+* This release just affects users of the Test::Reporter
+ and 'cpantest' utilities.
+* The 'munge_test_report' callback was getting the
+ grade passed as of 0.054, but the default callback
+ was now returning the wrong item. [#13086]
+
+Changes for 0.054 Fri Jun 3 17:44:40 CEST 2005
+=====================================================
+
+* This release paves the way for the CPANPLUS::Dist::*
+ plugins, providing a framework from which to
+ automatically create distributions from CPAN packages
+* Redo the 'cpan2dist' commandline tool, adding many
+ new options
+* Record all messages from the 'make' command on the
+ stack regardless.
+* Use the word 'test' when testing modules, not 'create'
+* Note in test reports that we skipped tests [#11587]
+* Fix some small documentation error [#11570]
+* Double check if a module is uptodate before asking
+ the user -- another prereq may have installed it
+ already [#11840]
+* Do a 'grep unique' on missing prerequisites, so we
+ dont list them more than once, even if the test output
+ does -- fixes bug [#11637]
+* Make sure we use an empty 'dist_type' in the tests in
+ case the user set on in his config
+* Add a _copy function to Utils.pm
+* Make sure the 'force' flag is propagated properly to
+ the 'resolve_prereqs' function
+* Add build_prereq flag to indicate prereqs should be
+ built even when uptodate when run under a packagemanager
+* When running CPANPLUS from a path not (absolutely) in
+ your @INC, we add our own path to 'original_inc' which
+ we restore on shell outs
+* Pass the grade to the 'munge_report' handler
+* Many test report improvements as provided by Barbie
+ in ticket #12302
+* Not all prereqs live on CPAN -- skip noting them as a
+ loaded prereq if we can't find it in the module tree
+ (as reported in #12723)
+* Bundled a version of T::H that does supports the 'no_plan'
+ feature of Test::More (#13019):
+ We can't automatically do 'the right thing' as 'make test'
+ invokes 'test_harness' which loads T::H before we can even
+ interfere so we add a msg about too low version to the
+ Makefile.PL instead and fall back to basic tests
+* Tell users why their sudo password might be asked during
+ 'make test'
+
+Changes for 0.053 Fri Feb 11 10:07:08 CET 2005
+====================================================
+
+* 0.052 did not ship with its META.yml, causing a few
+ of the bundles modules to be indexed. This release is
+ only relevant to the PAUSE indexer, and changes nothing
+ on the client side whatsoever.
+
+
+Changes for 0.052 Wed Feb 9 18:44:13 CET 2005
+====================================================
+
+* Make auto-installation work (with some guess work) if
+ $ENV{PERL_MM_USE_DEFAULT} is set.
+* Setup decent defaults for the callbacks, so scripts
+ don't have to set them unless they want actual callback
+ behaviour (This helps ExtUtils::AutoInstall greatly).
+* chmod() extracted files to 755 so we do not get permission
+ denied errors when trying to remove them or copy over them
+ if they were not +w for the user.
+* Don't use sudo, even if it's configured, if the user is
+ root already.
+* Default to 'prefer binary programs' if Compress::Zlib is
+ not installed.
+* Make 'parse_module' deal better with paths that have sub
+ directories in them.
+* Make 'parse_module' deal better with version numbers
+ that have letters in them.
+* Don't shell out to get the perl version if the perl we
+ looking for is $^X;
+* Improve finding a proper homedir for cpanplus on VMS
+* Accept the perl version as an optional argument to
+ 'module_is_supplied_with_perl_core'
+* Require Test::Reporter 1.27 for test reporting; it fixes
+ many bugs.
+* Only load Module::Build when we really needed it, not on
+ any installation.
+* Fix a bug that made 's reconfigure' not use the defaults
+ from your current config.
+* RedHat 9.0's stock perl has a few serious bugs in it
+ (they applied custom patches) and will break CPANPLUS
+ badly. Add a note to the makefile.pl that redhat users
+ should upgrade their perl.
+* CPANPLUS::inc was encountering 'use' calls that had windows
+ paths rather than unix paths (???). Patch to compensate
+ for this.
+* Module::Load::Conditional cache is being flushed in standard
+ flush runs now, allowing use of LWP (and similar) when it
+ becomes available, even if it previously wasn't.
+* Don't copy 'Config.pm-orig' to 'Config.pm' during Makefile.PL
+ stage -- if the user has a custom config and forgets to set
+ the environment var, CPANPLUS' tests will use the wrong config.
+* Some tarballs have '.' as directory, rather than project sub
+ directory. Guess first for extraction dir and verify, only
+ then try the actual extract path.
+* Improve documentation in the Default shell
+* Improve test reporting texts as supplied by Barbie
+* Add a callback to munge test reports before they are sent
+* Add versions of loaded dependencies to the test reports.
+* Make limited tests on skipped configuration work properly.
+* Don't use sudo to install into our own sandbox for
+ Module::Build tests
+* Skip module::build tests if we're under PERL_CORE and
+ M::B is not available (not yet integrated)
+* Skip install tests if run under PERL_CORE
+* Adjust include paths and paths to perl when tests are
+ run under PERL_CORE
+* Update bundled IPC::Run to version 0.80
+* Update bundled Module::Build to version 0.26081
+* Improve tests
+
+Changes for 0.051 Fri Jan 14 15:10:02 CET 2005
+====================================================
+
+* First official release in the ground-up rewrite '0.05x'
+ series
+* When determining installed versions, don't parse
+ commented out versions
+* Version numbers of 'undef' aren't really versions, they
+ are now treated as '0.0'
+* Split out 'create' into 'prepare' and 'create' so that
+ package manager plugins can provide an option to alter
+ metadata before actually building the package
+* Add convenience methods for 'prepare' and 'create'
+* Update CPANPLUS::Dist::Sample docs to reflect new
+ prepare functionality
+* Use constants where possible
+* Add new methods 'contains' to get a list of modules
+ contained in a package
+* Update to bundle Module::Build 0.2607
+* Return to prefering Build.PL over Makefile.PL
+* Update various other bundled modules
+* Bundle Module::Pluggable for Dist:: plugin support
+* Missing test suites of module was not detected
+ properly, resultings in undeserved 'pass' grade
+* dslip data with ';' in it caused parse errors
+* Mark a fatal error when loading the shell and not being
+ able to load a valid config file
+* Various spelling fixes
+* Improve tests
+
+
+Changes for 0.050_04 Sun Dec 26 16:54:46 CET 2004
+====================================================
+
+* Add rsync support to CPANPLUS
+* List rsync mirrors during setup
+* Default to the email mentioned in Config.pm during setup
+* Add timeout support for fetching files from mirrors
+* Config version has gone up because of new timeout version
+ -- reconfiguration required
+* Mention Bundle::CPANPLUS::Dependencies in the Makefile.PL
+* Add license information to dslip output
+* Send N/A Grade to cpantesters when your perl version is
+ too low according to the Makefile.PL
+* Drop dependancy on Mail::Send for test reporting, use a
+ fixed version of Test::Reporter instead
+* Alias $modobj->name to $modobj->module for more DWIMery
+* cpan2dist now allows creation of distributions from local
+ tarballs as well
+* cpan2dist now uses the newly defined dist standard to find
+ out where distributions were created
+* cpan2dist (and CPANPLUS::Dist) plugin detection is now regex
+ based
+* Specifying CPANPLUS object id's when creating fake module
+ or author objects is now optional
+* Small backward-compat hack to make sure old versions of
+ ExtUtils::AutoInstall keep working with the new CPANPLUS
+* Various documentation patches
+* Update various bundled modules
+
+
+
+Changes for 0.050_03 Fri Dec 17 13:54:48 CET 2004
+====================================================
+
+* Move to Module::Pluggable to find CPANPLUS::Dist::*
+ plugins.
+* Make CPANPLUS::Dist::* generate a few required accessors
+ itself, rather than making all submodules do it themselves
+* Rename cpan2dist.pl to cpan2dist to be more 'unixish'
+* Improve cpan2dist diagnostics
+* Add pod to cpan2dist
+* Change config layout for distribution types (incompatible
+ change -- will require reconfiguration)
+* Add 2-way version checking so cpanplus + its config can
+ both verify if their counterparts are compatible
+* Move logic for 'best_path_to_module_build' to Module.pm
+* Make logic to detect installed modules follow symlinks
+ (required for among others, debian)
+* 'force install' will try even harder to install a module
+ if it can, even if it previously failed.
+* Make test reports report the version of CPANPLUS, not the
+ version of the constants file the headers are in.
+* Update various bundled modules to their newest versions
+* Stringify '$@' to avoid clobbering by sub routine calls
+* Various documentation improvements
+* Various spelling fixes
+* Clean up trailing whitespace from sources
+* Add more files to MANIFEST.skip
+* Update MANIFEST
+
+
+Changes for 0.050_02 Fri Dec 10 15:03:39 CET 2004
+====================================================
+
+* Move CPANPLUS::Dist::(Deb|Ports) to it's own repository
+* Fix error when Test::Reporter is unavaliable
+* Various spelling fixes
+* Added CPANPLUS::Hacking pod with instructions how to hack on
+ CPANPLUS
+* Added an environment variable 'PERL5_CPANPLUS_IS_RUNNING' which
+ will be set to the current process id, so subprocesses can
+ recognize that they are running under CPANPLUS
+* Some wordings have changed for the setup, to make things a bit
+ clearer
+* Add 'do we have test::reporter support' probing code (used in
+ test suite)
+* Add Mail::Send as a prerequisite for test::reporter support
+* Don't attempt to actually send test reports from our test suite
+ -- Test::Reporter doesn't do that itself either, we might have
+ failed tests due to Test::Reporter rather than ourselves
+* Mention 'bundle::cpanplus::test::reporter' which has all the
+ modules needed to have test::reporter support enabled
+* Improved accuracy for core module detection logic and errors
+* More support for connecting to remote machines using
+ CPANPLUS::Daemon (not yet released, but will be soon)
+* Add extra clean up arguments to our own Makefile to remove temp
+ files
+* Extensive overhaul of CPANPLUS::Dist::Build to get Module::Build
+ support working properly (lots of workarounds for bugs in the M::B
+ API -- we now bundle a custom patched M::B (0.26061) to cope)
+* Module::Build now accepts buildflags
+* Seperate inc path for installers (defacto only Module::Build
+ right now)
+* Update various bundled modules like Object::Accessor, IPC::Cmd,
+ Archive::Extract.
+* Smarter loading of bundled modules
+* Various speed optimizations
+* 't --force' can send a new test::report now
+* Don't force current installer format onto prereqs, unless it's
+ explicitly requested
+* Make the default shell be aware when it's running in noninteractive
+ mode, making sure it makes no suggestions with require interactivity
+* Add a message about where the module was extracted to in verbose mode
+
+Changes for 0.050_1 Fri Dec 3 21:07:12 CET 2004
+====================================================
+
+* Initial beta release of CPANPLUS 0.050
+* Complete ground up rewrite
4,709 Changes
4,709 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
144 MANIFEST
@@ -0,0 +1,144 @@
+bin/cpan2dist
+bin/cpanp
+bin/cpanp-boxed
+ChangeLog
+inc/bundle/Archive/Extract.pm
+inc/bundle/Archive/Tar.pm
+inc/bundle/Archive/Tar/Constant.pm
+inc/bundle/Archive/Tar/File.pm
+inc/bundle/Class/Inspector.pm
+inc/bundle/Devel/InnerPackage.pm
+inc/bundle/File/Fetch.pm
+inc/bundle/File/Fetch/Item.pm
+inc/bundle/File/Spec.pm
+inc/bundle/File/Spec/Cygwin.pm
+inc/bundle/File/Spec/Epoc.pm
+inc/bundle/File/Spec/Functions.pm
+inc/bundle/File/Spec/Mac.pm
+inc/bundle/File/Spec/OS2.pm
+inc/bundle/File/Spec/Unix.pm
+inc/bundle/File/Spec/VMS.pm
+inc/bundle/File/Spec/Win32.pm
+inc/bundle/IO/String.pm
+inc/bundle/IO/Zlib.pm
+inc/bundle/IPC/Cmd.pm
+inc/bundle/IPC/Run.pm
+inc/bundle/IPC/Run/Debug.pm
+inc/bundle/IPC/Run/IO.pm
+inc/bundle/IPC/Run/Timer.pm
+inc/bundle/IPC/Run/Win32Helper.pm
+inc/bundle/IPC/Run/Win32IO.pm
+inc/bundle/IPC/Run/Win32Pump.pm
+inc/bundle/Locale/Maketext/Simple.pm
+inc/bundle/Log/Message.pm
+inc/bundle/Log/Message/Config.pm
+inc/bundle/Log/Message/Handlers.pm
+inc/bundle/Log/Message/Item.pm
+inc/bundle/Log/Message/Simple.pm
+inc/bundle/Module/CoreList.pm
+inc/bundle/Module/Load.pm
+inc/bundle/Module/Load/Conditional.pm
+inc/bundle/Module/Loaded.pm
+inc/bundle/Module/Pluggable.pm
+inc/bundle/Module/Pluggable/Object.pm
+inc/bundle/Object/Accessor.pm
+inc/bundle/Package/Constants.pm
+inc/bundle/Params/Check.pm
+inc/bundle/Term/UI.pm
+inc/bundle/Term/UI/History.pm
+inc/Module/Install.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/Scripts.pm
+inc/Module/Install/Win32.pm
+inc/Module/Install/WriteAll.pm
+lib/CPANPLUS.pm
+lib/CPANPLUS/Backend.pm
+lib/CPANPLUS/Backend/RV.pm
+lib/CPANPLUS/Config.pm
+lib/CPANPLUS/Configure.pm
+lib/CPANPLUS/Configure/Setup.pm
+lib/CPANPLUS/Dist.pm
+lib/CPANPLUS/Dist/MM.pm
+lib/CPANPLUS/Dist/Sample.pm
+lib/CPANPLUS/Error.pm
+lib/CPANPLUS/FAQ.pod
+lib/CPANPLUS/Hacking.pod
+lib/CPANPLUS/inc.pm
+lib/CPANPLUS/Internals.pm
+lib/CPANPLUS/Internals/Constants.pm
+lib/CPANPLUS/Internals/Constants/Report.pm
+lib/CPANPLUS/Internals/Extract.pm
+lib/CPANPLUS/Internals/Fetch.pm
+lib/CPANPLUS/Internals/Report.pm
+lib/CPANPLUS/Internals/Search.pm
+lib/CPANPLUS/Internals/Source.pm
+lib/CPANPLUS/Internals/Utils.pm
+lib/CPANPLUS/Internals/Utils/Autoflush.pm
+lib/CPANPLUS/Module.pm
+lib/CPANPLUS/Module/Author.pm
+lib/CPANPLUS/Module/Author/Fake.pm
+lib/CPANPLUS/Module/Checksums.pm
+lib/CPANPLUS/Module/Fake.pm
+lib/CPANPLUS/Module/Signature.pm
+lib/CPANPLUS/Shell.pm
+lib/CPANPLUS/Shell/Classic.pm
+lib/CPANPLUS/Shell/Default.pm
+lib/CPANPLUS/Shell/Default/Plugins/HOWTO.pod
+lib/CPANPLUS/Shell/Default/Plugins/Remote.pm
+lib/CPANPLUS/Shell/Default/Plugins/Source.pm
+Makefile.PL
+MANIFEST This list of files
+MANIFEST.SKIP
+META.yml
+README
+t/00_CPANPLUS-Inc.t
+t/00_CPANPLUS-Internals-Utils.t
+t/01_CPANPLUS-Configure.t
+t/02_CPANPLUS-Internals.t
+t/03_CPANPLUS-Internals-Source.t
+t/04_CPANPLUS-Module.t
+t/05_CPANPLUS-Internals-Fetch.t
+t/06_CPANPLUS-Internals-Constants.t
+t/07_CPANPLUS-Internals-Extract.t
+t/08_CPANPLUS-Backend.t
+t/09_CPANPLUS-Internals-Search.t
+t/10_CPANPLUS-Error.t
+t/19_CPANPLUS-Dist.t
+t/20_CPANPLUS-Dist-MM.t
+t/21_CPANPLUS-Dist-No-Build.t
+t/40_CPANPLUS-Internals-Report.t
+t/dummy-CPAN/authors/01mailrc.txt.gz
+t/dummy-CPAN/authors/id/A/AY/AYRNIEU/CHECKSUMS
+t/dummy-CPAN/authors/id/A/AY/AYRNIEU/Text-Bastardize-0.06.readme
+t/dummy-CPAN/authors/id/A/AY/AYRNIEU/Text-Bastardize-0.06.tar.gz
+t/dummy-CPAN/authors/id/C/CN/CNANDOR/CHECKSUMS
+t/dummy-CPAN/authors/id/C/CN/CNANDOR/MP3-Info-1.02.tar.gz
+t/dummy-CPAN/authors/id/D/DO/DOUGM/CHECKSUMS
+t/dummy-CPAN/authors/id/D/DO/DOUGM/Xmms-Perl-0.12.tar.gz
+t/dummy-CPAN/authors/id/F/FA/FAKE/CHECKSUMS
+t/dummy-CPAN/authors/id/F/FA/FAKE/Foo-Bar-0.01.tar.gz
+t/dummy-CPAN/authors/id/G/GA/GAAS/CHECKSUMS
+t/dummy-CPAN/authors/id/G/GA/GAAS/Digest-MD5-2.30.tar.gz
+t/dummy-CPAN/authors/id/K/KW/KWILLIAMS/CHECKSUMS
+t/dummy-CPAN/authors/id/K/KW/KWILLIAMS/Cwd-2.18.tar.gz
+t/dummy-CPAN/authors/id/L/LD/LDS/Bundle-MP3-1.00.tar.gz
+t/dummy-CPAN/authors/id/L/LD/LDS/CHECKSUMS
+t/dummy-CPAN/authors/id/L/LD/LDS/MP3-Napster-2.04.tar.gz
+t/dummy-CPAN/authors/id/N/NW/NWCLARK/CHECKSUMS
+t/dummy-CPAN/authors/id/N/NW/NWCLARK/perl-5.8.5.tar.gz
+t/dummy-CPAN/modules/02packages.details.txt.gz
+t/dummy-CPAN/modules/03modlist.data.gz
+t/dummy-cpanplus/.hidden
+t/dummy-localmirror/.hidden
+t/dummy-perl/lib/.hidden
+t/dummy-perl/man/man1/.hidden
+t/dummy-perl/man/man3/.hidden
+t/inc/conf.pl
+t/src/Build/noxs/Foo-Bar-0.01.tar.gz
+t/src/Build/xs/Foo-Bar-0.01.tar.gz
+t/src/MM/noxs/Foo-Bar-0.01.tar.gz
+t/src/MM/xs/Foo-Bar-0.01.tar.gz
32 MANIFEST.SKIP
@@ -0,0 +1,32 @@
+^blib/
+^t/dummy-cpanplus/(?!\.hidden)
+^t/dummy-localmirror/authors/id
+^t/dummy-localmirror/.*gz
+t/dummy-perl/.*(pm|3|packlist)$
+^t/\..*
+^\.#autoinstall
+^pmfiles.dat$
+^Makefile$
+^Makefile.old$
+^MANIFEST.bak$
+^pm_to_blib
+^blibdirs
+^TODO$
+^cover_db/
+^tmp/
+^samples/
+^CPANPLUS.*gz$
+\.DS_Store$
+\.swp$
+\.orig$
+\.rpt$
+lib/CPANPLUS/inc/installers/patches/
+Changes
+^patches/
+\.org$
+\.rej$
+dev-bin/
+^CPANPLUS
+^.cpanplus/
+^sandbox
+~$
13 META.yml
@@ -0,0 +1,13 @@
+name: CPANPLUS
+version: 0.073_01
+abstract: Ameliorated interface to the CPAN
+author: Jos Boumans <kane@cpan.org>
+license: perl
+distribution_type: module
+requires:
+ perl: 5.6.1
+no_index:
+ directory:
+ - lib/CPANPLUS/inc
+ - inc
+generated_by: Module::Install version 0.36
227 Makefile.PL
@@ -0,0 +1,227 @@
+#!/usr/bin/perl
+
+### we /need/ perl5.6.1 or higher -- we use coderefs in @INC,
+### and 5.6.0 is just too buggy
+use 5.006001;
+
+use strict;
+use warnings;
+
+BEGIN {
+ ### chdir to the makefile.pl dir
+ use FindBin;
+ chdir $FindBin::Bin;
+
+ use File::Spec;
+
+ ### add the directory to our bundled modules
+ use vars qw[@ORIG_INC];
+ @ORIG_INC = @INC; # store for later use
+
+ require lib;
+ my $l = 'lib';
+ $l->import( qw[lib], File::Spec->catdir(qw[inc bundle]) );
+}
+
+
+### there's issues with redhat 9.0's stock perl -- they applied some
+### custom patches on their 5.8.0 and it breaks use constant a => sub {};
+if( $^O eq 'linux' and -e '/etc/redhat-release' and
+ $] == '5.008' and (grep /Red Hat, Inc/, values %Config::Config)
+) {
+ print qq(
+### IMPORTANT! ######################################################
+
+You are using perl $] supplied by RedHat, who have applied custom
+patches that break various perl modules, including this one.
+
+You will have to migrate to a perl without these flaws. You could
+do this for example by building a perl installation by hand.
+You can obtain the sources from www.cpan.org.
+
+We're sorry for the inconvenience.
+
+#####################################################################
+
+ ) . $/;
+
+ require 5.008001;
+}
+
+### dont use, we dont want the coderef in @INC
+### XXX other modules use it, so the coderef will still be there ;(
+require CPANPLUS::inc; # XXX get rid of me!
+### it spews warnings though, so grep those out
+### also grep out the warnings we get from using Module::Loaded
+BEGIN {
+ $SIG{__WARN__} = sub {
+ print STDERR "@_" if
+ "@_" !~ /^CPANPLUS::inc/ and
+ "@_" !~ /Constant subroutine/;
+ };
+}
+
+use inc::Module::Install;
+use Getopt::Long;
+use CPANPLUS::Backend;
+use CPANPLUS::Configure;
+use CPANPLUS::Configure::Setup;
+use CPANPLUS::Internals::Constants;
+use Locale::Maketext::Simple Class => 'CPANPLUS', Style => 'gettext';
+
+
+use constant BASIC_TESTS => qq[t/00_CPANPLUS-Internals-Utils.t];
+
+
+my $Tests;
+my $Prereq = {};
+my $RunSetup;
+GetOptions( 'setup' => \$RunSetup );
+
+my $Backend = CPANPLUS::Backend->new;
+my $Config = CPANPLUS::Configure->new;
+
+### no setup? this is easy.. print the message and move a long
+unless( $RunSetup ) {
+ print qq[
+### IMPORTANT! ######################################################
+
+
+As of CPANPLUS 0.070, configuration during 'perl Makefile.PL'
+is no longer required. A default config is now shipped that
+should work out of the box on most machines, for priviliged
+and unprivileged users.
+
+If you wish to configure CPANPLUS to your environment, you can
+either do that from the interactive shell after installation:
+
+ \$ cpanp
+ CPAN Terminal> s conf user # per user config
+ CPAN Terminal> s conf system # system wide config
+
+Or you can invoke this program as follows, to do it now:
+
+ \$ $^X Makefile.PL --setup
+
+This also means that any config created by any CPANPLUS older
+than 0.070 will no longer work, and you are required to
+reconfigure. See the ChangeLog file for details.
+
+We appologize for the inconvenience.
+ ] . $/;
+
+### ok, we're asked to run the setup stuff, let's do it
+} else {
+
+ my $setup = CPANPLUS::Configure::Setup->new(
+ backend => $Backend,
+ configure_object => $Config,
+ );
+
+ $setup->init;
+}
+
+### mention our prereqs
+{ print loc("
+### PLEASE NOTE ###################################################
+
+Since CPANPLUS 0.050 has a few prerequisites that are not core
+perl (yet), they are bundled with the distribution for boot-
+strapping purposes.
+
+You should install these prerequisites before continueing to
+install CPANPLUS. You can use the bootstrapped CPANPLUS to do
+this for you with the following command:
+
+ %1
+
+Or let your package manager take care of it.
+
+###################################################################
+
+ ", "$^X bin/cpanp-boxed -i Bundle::CPANPLUS::Dependencies" );
+ print "\n";
+}
+
+
+### toss out the old source files, they might be compiled
+### in an incompatilbe format (rt #18121)
+{ my $stored = $Backend->__storable_file( $Config->get_conf('base') );
+ 1 while unlink $stored;
+}
+
+### write the makefile.pl
+{
+ $Prereq = {
+ 'File::Fetch' => '0.08', # win32 ftp support
+ 'File::Spec' => '0.82',
+ 'IPC::Cmd' => '0.24',
+ 'Locale::Maketext::Simple' => '0.01',
+ 'Log::Message' => '0.01',
+ 'Module::Load' => '0.10',
+ 'Module::Load::Conditional' => '0.10', # %INC lookup support
+ 'Params::Check' => '0.22',
+ 'Package::Constants' => '0.01',
+ 'Term::UI' => '0.05',
+ 'Test::Harness' => '2.62', # due to bug #19505
+ # only 2.58 and 2.60 are bad
+ 'Test::More' => '0.47', # to run our tests
+ 'Archive::Extract' => '0.11', # bzip2 support
+ 'Archive::Tar' => '1.23',
+ 'IO::Zlib' => '1.04',
+ 'Object::Accessor' => '0.03',
+ 'Module::CoreList' => '1.97',
+ 'Module::Pluggable' => '2.4',
+ 'Module::Loaded' => '0.01',
+ #'Config::Auto' => 0, # not yet, not using it yet
+ };
+
+ ### depending on your choices, we might need to add some modules
+ ### to your PREREQ_PM
+ { if( !$Config->get_conf('prefer_makefile') ) {
+ $Prereq->{ 'CPANPLUS::Dist::Build' } = '0.04';
+ }
+
+ if( $^O eq 'MSWin32') {
+ $Prereq->{ 'Win32::Process' } = 0;
+ }
+
+ ### used to have 0.80, but not it was never released by coral
+ ### 0.79 *should* be good enough for now... asked coral to
+ ### release 0.80 on 10/3/2006
+ ### Win32 and Cygwin users need it.. otherwise, no buffers
+ ### can be captured
+ if( $^O eq 'MSWin32' or $^O eq 'Cygwin' ) {
+ $Prereq->{ 'IPC::Run' } = '0.79';
+ }
+ }
+
+
+ ### restore the original @INC, so proper probing of missing
+ ### prereqs can be done
+ @INC = @ORIG_INC;
+ name ('CPANPLUS');
+ author ('Jos Boumans <kane@cpan.org>');
+ abstract ('Ameliorated interface to the CPAN');
+ version_from ('lib/CPANPLUS/Internals.pm');
+ license ('perl');
+ no_index ( directory => 'lib/CPANPLUS/inc' );
+ install_script ($_) for glob('bin/*');
+ requires (%$Prereq);
+ makemaker_args ( test => { TESTS => $Tests } ) if $Tests;
+ makemaker_args ( clean => { FILES => 't/.*.output .cpanplus t/dummy-cpanplus/* t/dummy-cpanplus/.cpanplus' } );
+
+ ### write the makefile
+ ### this makes all prereqs rediscovered
+ { use Module::Loaded;
+ for ( keys %$Prereq ) {
+ mark_as_unloaded( $_ ) if is_loaded( $_ );
+ }
+
+ ### silence warnings about redefines...
+ ### this will still warn about redefine of CONSTANTS subs...
+ no warnings; local $^W;
+ &WriteAll( check_nmake => 1 );
+ }
+}
+
125 README
@@ -0,0 +1,125 @@
+This is the README file for CPANPLUS, Ameliorated interface to
+the Comprehensive Perl Archive Network, by Jos Boumans.
+
+Please type "perldoc CPANPLUS" after installation to see the
+module usage information. For shell usage, please consult
+"perldoc cpanp"; the FAQ is available as "perldoc CPANPLUS::FAQ".
+
+You may also want to read the 'ChangeLog' file, which describes new
+features, bugfixes and additional notes for this release.
+
+###################################################################
+###
+### Installation
+###
+###################################################################
+
+CPANPLUS uses the standard perl module install process:
+
+ $ perl Makefile.PL
+ $ make # or 'nmake' on Windows
+ $ make test
+ $ make install
+
+After installation you can start CPANPLUS' interactive client
+by running one of the following commands:
+
+ $ cpanp
+ $ perl -MCPANPLUS -eshell
+
+CPANPLUS also ships a 'boxed' cpanp client, so you can run it
+out of it's extraction dir, by typing:
+
+ $ perl bin/cpanp-boxed
+
+This may help you with bootstrap issues, or other situations
+where you need to use CPANPLUS but can not use a system installation.
+
+You can install all of CPANPLUS' dependencies like this, before
+installing CPANPLUS itself by running:
+
+ $ perl bin/cpanp-boxed -i Bundle::CPANPLUS::Dependencies
+
+All the modules bundled are found in the 'inc/bundle' directory. If
+you, for whatever reason, wish to not install these from cpan, you
+could include them into your environment as such (using tcsh):
+
+ $ setenv PERL5LIB `pwd`/inc/bundle
+
+
+###################################################################
+###
+### Notes for windows users
+###
+###################################################################
+
+If you are using Microsoft Windows, you will probably need the 'nmake'
+utility before installation. It's available at:
+
+ http://download.microsoft.com/download/vc15/Patch/1.52/W95/EN-US/nmake15.exe
+
+If you are connected to the internet, "perl Makefile.PL" is capable
+of automatically fetch it, and install into your Perl/bin directory.
+You will see a message like this:
+
+ The required 'nmake' executable not found, fetching it...
+
+However, if you are not yet online, or wish to install 'nmake' into
+another directory, then please download the file manually, save it to
+a directory in %PATH (e.g. C:\WINDOWS\COMMAND), then launch the MS-DOS
+command line shell, "cd" to that directory, and run "nmake15.exe" from
+there; that will create the 'nmake.exe' file.
+
+You may then resume the installation process above, but replace 'make'
+with 'nmake' in the last three lines.
+
+
+###################################################################
+###
+### Notes on CPAN testing
+###
+###################################################################
+
+CPANPLUS offers several features to query and report module testing results.
+
+For example, typing "cpanp -c DBI" in the command line (or "c DBI" in
+the CPANPLUS default shell) will display the test results of latest
+DBI package.
+
+If you wish to report module test results as part of installation process,
+please answer "Y" to the 'Report tests results? [y/N]:' question during
+the interactive configuration. You can also type "s edit" in the CPANPLUS
+Default Shell to edit the config file manually, or just enter "s conf
+cpantest 1" and "s save" to save the settings.
+
+Please consult the CPAN Tester's Website (http://testers.cpan.org/) for
+detailed information.
+
+
+###################################################################
+###
+### Contact
+###
+###################################################################
+
+CPANPLUS has several mailing lists you can write to:
+
+- Questions/suggestions: <cpanplus-info@lists.sourceforge.net>
+- Development list: <cpanplus-devel@lists.sourceforge.net>
+- Bug reporting: <bug-cpanplus@rt.cpan.org>
+
+News and project updates are available at http://cpanplus.sf.net/.
+
+
+###################################################################
+###
+### License
+###
+###################################################################
+
+Copyright 2001-2006 by Jos Boumans <kane@cpan.org>.
+
+All rights reserved. You can redistribute and/or modify
+this bundle under the same terms as Perl itself.
+
+See <http://www.perl.com/perl/misc/Artistic.html>.
63 TODO
@@ -0,0 +1,63 @@
+### cpanplus 0.050_01 release requirements ###
+* use extutils::autoinstall to fetch chosen prereqs in makefile.pl
+ EU::AI doesn't support cpanplus' own new api yet, so it's not
+ feasible to have EU::AI install prereqs. bundle them for now.
+ * compat API added to CPANPLUS, but we still have a bootstrap issue
+ without some of these prereqs, so keep bundling anyway
+
+
+### todo code marks things that are present in 0.04x but not in 0.05x yet
+### wishlist is new features we want to add
+
+### TODO ###
+
+### installing ###
+* Support autobundle installation
+ low priority for now
+
+### testing ###
+* Perhaps add a check where one can't send out a certain report
+ more than once?
+ * depends on how long it takes for testers.cpan.org to pick
+ it up
+* Improve test coverage
+* offer module authors a way to include debugging output from 'make test'
+ with the automated reporting system
+ * POE and Test::Reporter both create extra debugging information on disk
+* skip t/20's install tests if PERL_CORE is set, to facilitate perl core
+ inclusion (mostly to compensate for the guesswork during makefile.pl)
+
+### UI ###
+* For the default shell, let 'h' show a help list, and '?' more details on
+ a specific command
+ - the syntax is supported now, but the help isn't written yet.
+* Conditional pager opens?
+* let 'o' take regexes. current workaround: m re*; o *;
+
+
+### dists ###
+* Dist::RPM, ::PPM, ::Ports, etc
+* We just split out 'create' into prepare & create
+ * stresstest (another beta release?)
+
+
+### WISHLIST ###
+* Version check on startup
+* Self update
+ - Acme::SoftwareUpdate?
+* Check if a module already exists in the package manager of choice?
+* Periodic host checking (see if they're still good mirrors)
+* Make error stack reports available on a per-module (dist) basis,
+ as discussed in '[Cpanplus-devel] error stack reporting a bit overzealous'
+* Test reports should only contain texts of the module they pertain to,
+ rather than all modules in the current loop (like i 1..10 from the shell)
+ also reported as ticket [#11404]
+
+
+### ISSUES ###
+* Figure out what the best way is to check 'uptodateness' for modules,
+ especially because M::B version ranges are different from EU::MM
+ - perhaps use version.pm?
+ * yes, ping jpeacock
+ - use M::B?
+ - use M::L::Conditional?
595 bin/cpan2dist
@@ -0,0 +1,595 @@
+#!/usr/bin/perl -w
+use strict;
+use CPANPLUS::Backend;
+use CPANPLUS::Dist;
+use CPANPLUS::Internals::Constants;
+use Data::Dumper;
+use Getopt::Long;
+use File::Spec;
+use File::Basename;
+use Locale::Maketext::Simple Class => 'CPANPLUS', Style => 'gettext';
+
+use constant PREREQ_SKIP_CLASS => 'CPANPLUS::To::Dist::PREREQ_SKIP';
+use constant ALARM_CLASS => 'CPANPLUS::To::Dist::ALARM';
+
+### print when you can
+$|++;
+
+my $cb = CPANPLUS::Backend->new
+ or die loc("Could not create new CPANPLUS::Backend object");
+my $conf = $cb->configure_object;
+
+my %formats = map { $_ => $_ } CPANPLUS::Dist->dist_types;
+
+my $opts = {};
+GetOptions( $opts,
+ 'format=s', 'archive',
+ 'verbose!', 'force!',
+ 'skiptest!', 'keepsource!',
+ 'makefile!', 'buildprereq!',
+ 'help', 'flushcache',
+ 'ban=s@', 'banlist=s@',
+ 'ignore=s@', 'ignorelist=s@',
+ 'defaults', 'modulelist=s@',
+ 'logfile=s', 'timeout=s',
+ 'default-banlist!',
+ 'default-ignorelist!',
+ );
+
+die usage() if exists $opts->{'help'};
+
+### parse options
+my $tarball = $opts->{'archive'} || 0;
+my $keep = $opts->{'keepsource'} ? 1 : 0;
+my $prereqbuild = exists $opts->{'buildprereq'}
+ ? $opts->{'buildprereq'}
+ : 0;
+my $timeout = exists $opts->{'timeout'}
+ ? $opts->{'timeout'}
+ : 300;
+
+### use default answers?
+$ENV{'PERL_MM_USE_DEFAULT'} = $opts->{'defaults'} ? 1 : 0;
+
+my $format;
+### if provided, we go with the command line option, fall back to conf setting
+{ $format = $opts->{'format'} || $conf->get_conf('dist_type');
+ $conf->set_conf( dist_type => $format );
+
+ ### is this a valid format??
+ die loc("Invalid format: " . ($format || "[NONE]") ) . usage()
+ unless $formats{$format};
+
+
+ my $verbose = exists $opts->{'verbose'}
+ ? $opts->{'verbose'}
+ : $conf->get_conf('verbose');
+ $conf->set_conf( verbose => $verbose );
+
+
+ my $force = exists $opts->{'force'}
+ ? $opts->{'force'}
+ : $conf->get_conf('force');
+ $conf->set_conf( force => $force );
+
+
+ my $skiptest = exists $opts->{'skiptest'}
+ ? $opts->{'skiptest'}
+ : $conf->get_conf('skiptest');
+ $conf->set_conf( skiptest => $skiptest );
+
+
+ my $makefile = exists $opts->{'makefile'}
+ ? $opts->{'makefile'}
+ : $conf->get_conf('prefer_makefile');
+ $conf->set_conf( prefer_makefile => $makefile );
+}
+
+my @modules = @ARGV;
+if( exists $opts->{'modulelist'} ) {
+ push @modules, map { parse_file( $_ ) } @{ $opts->{'modulelist'} };
+}
+
+die usage() unless @modules;
+
+
+my $fh;
+LOGFILE: {
+ if( my $file = $opts->{logfile} ) {
+ open $fh, ">$file" or (
+ warn loc("Could not open '%1' for writing: %2", $file,$!),
+ last LOGFILE
+ );
+
+ warn "Logging to '$file'\n";
+
+ *STDERR = $fh;
+ *STDOUT = $fh;
+ }
+}
+
+### reload indices if so desired
+$cb->reload_indices() if $opts->{'flushcache'};
+
+{ my @ban = exists $opts->{'ban'}
+ ? map { qr/$_/ } @{ $opts->{'ban'} }
+ : ();
+
+
+ if( exists $opts->{'banlist'} ) {
+ push @ban, map { parse_file( $_, 1 ) } @{ $opts->{'banlist'} };
+ }
+
+ push @ban, map { s/\s+//; $_ }
+ map { [split /\s*#\s*/]->[0] }
+ grep { /#/ }
+ map { split /\n/ } _default_ban_list()
+ if $opts->{'default-banlist'};
+
+ ### use our prereq install callback
+ $conf->set_conf( prereqs => PREREQ_ASK );
+
+ ### register install callback ###
+ $cb->_register_callback(
+ name => 'install_prerequisite',
+ code => \&__ask_about_install,
+ );
+
+
+ ### check for ban patterns when handling prereqs
+ sub __ask_about_install {
+
+ my $mod = shift or return;
+ my $prereq = shift or return;
+
+
+ ### die with an error object, so we can verify that
+ ### the die came from this location, and that it's an
+ ### 'acceptable' death
+ my $pat = ban_me( $prereq );
+ die bless \(loc("Module '%1' requires '%2' to be installed " .
+ "but found in your ban list (%3) -- skipping",
+ $mod->module, $prereq->module, $pat )),
+ PREREQ_SKIP_CLASS if $pat;
+ return 1;
+ }
+
+ ### should we skip this module?
+ sub ban_me {
+ my $mod = shift;
+
+ for my $pat ( @ban ) {
+ return $pat if $mod->module =~ /$pat/;
+ }
+ return;
+ }
+}
+
+### patterns to strip from prereq lists
+{ my @ignore = exists $opts->{'ignore'}
+ ? map { qr/$_/ } @{ $opts->{'ignore'} }
+ : ();
+
+ if( exists $opts->{'ignorelist'} ) {
+ push @ignore, map { parse_file( $_, 1 ) } @{ $opts->{'ignorelist'} };
+ }
+
+ push @ignore, map { s/\s+//; $_ }
+ map { [split /\s*#\s*/]->[0] }
+ grep { /#/ }
+ map { split /\n/ } _default_ignore_list()
+ if $opts->{'default-ignorelist'};
+
+
+ ### register install callback ###
+ $cb->_register_callback(
+ name => 'filter_prereqs',
+ code => \&__filter_prereqs,
+ );
+
+ sub __filter_prereqs {
+ my $cb = shift;
+ my $href = shift;
+
+ for my $name ( keys %$href ) {
+ my $obj = $cb->parse_module( module => $name ) or (
+ warn "Cannot make a module object out of ".
+ "'$name' -- skipping\n",
+ next );
+
+ if( my $pat = ignore_me( $obj ) ) {
+ warn loc("'%1' found in your ignore list (%2) ".
+ "-- filtering it out\n", $name, $pat);
+
+ delete $href->{ $name };
+ }
+ }
+
+ return $href;
+ }
+
+ ### should we skip this module?
+ sub ignore_me {
+ my $mod = shift;
+
+ for my $pat ( @ignore ) {
+ return $pat if $mod->module =~ /$pat/;
+ return $pat if $mod->package_name =~ /$pat/;
+ }
+ return;
+ }
+}
+
+
+my %done;
+for my $name (@modules) {
+
+ my $obj;
+
+ ### is it a tarball? then we get it locally and transform it
+ ### and it's dependencies into .debs
+ if( $tarball ) {
+ ### make sure we use an absolute path, so chdirs() dont
+ ### mess things up
+ $name = File::Spec->rel2abs( $name );
+
+ ### ENOTARBALL?
+ unless( -e $name ) {
+ warn loc("Archive '$name' does not exist");
+ next;
+ }
+
+ $obj = CPANPLUS::Module::Fake->new(
+ module => basename($name),
+ path => dirname($name),
+ package => basename($name),
+ );
+
+ ### if it's a traditional CPAN package, we can tidy
+ ### up the module name some
+ $obj->module( $obj->package_name ) if $obj->package_name;
+
+ ### get the version from the package name
+ $obj->version( $obj->package_version || 0 );
+
+ ### set the location of the tarball
+ $obj->status->fetch($name);
+
+ ### plain old cpan module?
+ } else {
+
+ ### find the corresponding module object ###
+ $obj = $cb->parse_module( module => $name ) or (
+ warn "Cannot make a module object out of ".
+ "'$name' -- skipping\n",
+ next );
+ }
+
+ ### you banned it?
+ if( my $pat = ban_me( $obj ) ) {
+ warn loc("'%1' found in your ban list (%2) -- skipping\n",
+ $obj->module, $pat );
+ next;
+ }
+
+ ### or just ignored it?
+ if( my $pat = ignore_me( $obj ) ) {
+ warn loc("'%1' found in your ignore list (%2) -- skipping\n",
+ $obj->module, $pat );
+ next;
+ }
+
+
+ my $dist = eval {
+ local $SIG{ALRM} = sub { die bless {}, ALARM_CLASS }
+ if $timeout;
+
+ alarm $timeout || 0;
+
+ $obj->install(
+ prereq_target => 'create',
+ target => 'create',
+ keep_source => $keep,
+ prereq_build => $prereqbuild );
+
+ alarm 0;
+ };
+
+ ### set here again, in case the install dies
+ alarm 0;
+
+ ### install failed due to a 'die' in our prereq skipper?
+ if( $@ and ref $@ and $@->isa( PREREQ_SKIP_CLASS ) ) {
+ warn loc("Dist creation of '%1' skipped: '%2'",
+ $obj->module, ${$@} );
+ next;
+
+ } elsif ( $@ and ref $@ and $@->isa( ALARM_CLASS ) ) {
+ warn loc("\nDist creation of '%1' skipped, build time exceeded: ".
+ "%2 seconds\n", $obj->module, $timeout );
+ next;
+
+ ### died for some other reason? just report and skip
+ } elsif ( $@ ) {
+ warn loc("Dist creation of '%1' failed: '%2'",
+ $obj->module, $@ );
+ next;
+ }
+
+ ### we didn't get a dist object back?
+ ($dist and $obj->status->dist) or (
+ warn loc("Unable to create '%1' dist of '%2'", $format, $obj->module),
+ next
+ );
+
+ print "Created '$format' distribution for ", $obj->module,
+ " to:\n\t", $obj->status->dist->status->dist, "\n";
+}
+
+
+sub parse_file {
+ my $file = shift or return;
+ my $qr = shift() ? 1 : 0;
+
+ my $fh = OPEN_FILE->( $file ) or return;
+
+ my @rv;
+ while( <$fh> ) {
+ chomp;
+ next if /^#/; # skip comments
+ next unless /\S/; # skip empty lines
+ s/^(\S+).*/$1/; # skip extra info
+ push @rv, $qr ? qr/$_/ : $_; # add pattern to the list
+ }
+
+ return @rv;
+}
+
+=head1 NAME
+
+cpan2dist - The CPANPLUS distribution creator
+
+=head1 DESCRIPTION
+
+This script will create distributions of C<CPAN> modules of the format
+you specify, including its prerequisites. These packages can then be
+installed using the corresponding package manager for the format.
+
+Note, you can also do this interactively from the default shell,
+C<CPANPLUS::Shell::Default>. See the C<CPANPLUS::Dist> documentation,
+as well as the documentation of your format of choice for any format
+specific documentation.
+
+=head1 USAGE
+
+=cut
+
+sub usage {
+ my $me = basename($0);
+ my $formats = join "\n", map { "\t\t$_" } sort keys %formats;
+
+ my $usage = << '=cut';
+=pod
+
+Usage: cpan2dist [--format FMT] [OPTS] Mod::Name [Mod::Name, ...]
+ cpan2dist [--format FMT] [OPTS] --modulelist /tmp/mods.list
+ cpan2dist [--format FMT] [OPTS] --archive /tmp/dist [/tmp/dist2]
+
+ Will create a distribution of type FMT of the modules
+ specified on the command line, and all their prerequisites.
+
+ Can also create a distribution of type FMT from a local
+ archive and all it's prerequisites
+
+=cut
+
+ $usage .= qq[
+ Possible formats are:
+$formats
+
+ You can install more formats from CPAN!
+ \n];
+
+ $usage .= << '=cut';
+=pod
+
+Options:
+
+ ### take no argument:
+ --help Show this help message
+ --skiptest Skip tests. Can be negated using --noskiptest
+ --force Force operation. Can be negated using --noforce
+ --verbose Be verbose. Can be negated using --noverbose
+ --keepsource Keep sources after building distribution. Can be
+ negated by --nokeepsource. May not be supported
+ by all formats
+ --makefile Prefer Makefile.PL over Build.PL. Can be negated
+ using --nomakefile. Defaults to your config setting
+ --buildprereq Build packages of any prerequisites, even if they are
+ already uptodate on the local system. Can be negated
+ using --nobuildprereq. Defaults to false.
+ --archive Indicate that all modules listed are actually archives
+ --flushcache Update CPANPLUS' cache before commencing any operation
+ --defaults Instruct ExtUtils::MakeMaker and Module::Build to use
+ default answers during 'perl Makefile.PL' or 'perl
+ Build.PL' calls where possible
+
+ ### take argument:
+ --format Installer format to use (defaults to config setting)
+ --ban Patterns of module names to skip during installation
+ (affects prerequisites too) May be given multiple times
+ --banlist File containing patterns that could be given to --ban
+ Are appended to the ban list built up by --ban
+ May be given multiple times.
+ --ignore Patterns of modules to exclude from prereq list. Useful
+ for when a prereq listed by a CPAN module is resolved
+ in another way than from its corresponding CPAN package
+ (Match is done on both module name, and package name of
+ the package the module is in)
+ --ignorelist File containing patterns that may be given to --ignore.
+ Are appended to the ban list build up by --ignore.
+ May be given multiple times.
+ --modulelist File containing a list of modules that should be built.
+ Are appended to the list of command line modules.
+ May be given multiple times.
+ --logfile File to log all output to. By default, all output goes
+ to the console.
+ --timeout The allowed time for buliding a distribution before
+ aborting. This is useful to terminate any build that
+ hang or happen to be interactive despite being told not
+ to be. Defaults to 300 seconds. To turn off, you can
+ set it to 0.
+
+ ### builtin lists
+ --builtin-banlist Use our builtin banlist. Works just like --ban
+ and --banlist, but with pre-set lists. See the
+ "Builtin Lists" section for details.
+ --default-ignorelist Use our builtin ignorelist. Works just like
+ --ignore and --ignorelist but with pre-set lists.
+ See the "Builtin Lists" section for details.
+
+Examples:
+
+ ### build a debian package of DBI and it's prerequisites,
+ ### don't bother running tests
+ cpan2dist --format CPANPLUS::Dist::Deb --buildprereq --skiptest DBI
+
+ ### Build a package, whose format is determined by your config of
+ ### the local tarball, reloading cpanplus' indices first and using
+ ### the tarballs Makefile.PL if it has one.
+ cpan2dist --makefile --flushcache --archive /path/to/Cwd-1.0.tgz
+
+ ### build a package from Net::FTP, but dont build any packages or
+ ### dependencies whose name match 'Foo', 'Bar' or any of the
+ ### patterns mentioned in /tmp/ban
+ cpan2dist --ban Foo --ban Bar --banlist /tmp/ban Net::FTP
+
+ ### build a package from Net::FTP, but ignore it's listed dependency
+ ### on IO::Socket, as it's shipped per default with the OS we're on
+ cpan2dist --ignore IO::Socket Net::FTP
+
+ ### building all modules listed, plus their prerequisites
+ cpan2dist --ignorelist /tmp/modules.ignore --banlist /tmp/modules.ban
+ --modulelist /tmp/modules.list --buildprereq --flushcache
+ --makefile --defaults
+
+
+=cut
+
+ $usage .= qq[
+Builtin Lists:
+
+ Ignore list:] . _default_ignore_list() . qq[
+ Ban list:] . _default_ban_list();
+
+ ### strip the pod directives
+ $usage =~ s/=pod\n//g;
+
+ return $usage;
+}
+
+=pod
+
+=head1 Built-In Filter Lists
+
+Some modules you'd rather not package. Some because they
+are part of core-perl and you dont want a new package.
+Some because they won't build on your system. Some because
+your package manager of choice already packages them for you.
+
+There may be a myriad of reasons. You can use the C<--ignore>
+and C<--ban> options for this, but we provide some built-in
+lists that catch common cases. You can use these built-in lists
+if you like, or supply your own if need be.
+
+=head2 Built-In Ignore List
+
+=pod
+
+You can use this list of regexes to ignore modules matching
+to be listed as prerequisites of a package. Particulaly useful
+if they are bundled with core-perl anyway and they have known
+issues building.
+
+Toggle it by supplying the C<--default-ignorelist> option.
+
+=cut
+
+sub _default_ignore_list {
+
+ my $list = << '=cut';
+=pod
+
+ ^IO$ # Provided with core anyway
+ ^Cwd$ # Provided with core anyway
+ ^File::Spec # Provided with core anyway
+ ^Config$ # Perl's own config, not shipped separately
+ ^ExtUtils::MakeMaker$ # Shipped with perl, recent versions
+ # have bug 14721 (see rt.cpan.org)
+ ^ExtUtils::Install$ # Part of of EU::MM, same reason
+
+=cut
+
+ return $list;
+}
+
+=head2 Built-In Ban list
+
+You can use this list of regexes to disable building of these
+modules altogether.
+
+Toggle it by supplying the C<--default-banlist> option.
+
+=cut
+
+sub _default_ban_list {
+
+ my $list = << '=cut';
+=pod
+
+ ^GD$ # Needs c libaries
+ ^Berk.*DB # DB packages require specific options & linking
+ ^DBD:: # DBD drives require database files/headers
+ ^XML:: # XML modules usually require expat libraries
+ Apache # These usually require apache libraries
+ SSL # These usually require SSL certificates & libs
+ Image::Magick # Needs ImageMagick C libraries
+ Mail::ClamAV # Needs ClamAV C Libraries
+ ^Verilog # Needs Verilog C Libraries
+ ^Authen::PAM$ # Needs PAM C libraries & Headers
+
+=cut
+
+ return $list;
+}
+
+__END__
+
+=head1 SEE ALSO
+
+L<CPANPLUS::Dist>, L<CPANPLUS::Module>, L<CPANPLUS::Shell::Default>,
+C<cpanp>
+
+=head1 AUTHOR
+
+This module by
+Jos Boumans E<lt>kane@cpan.orgE<gt>.
+
+=head1 COPYRIGHT
+
+The CPAN++ interface (of which this module is a part of) is
+copyright (c) 2001-2006, Jos Boumans E<lt>kane@cpan.orgE<gt>.
+All rights reserved.
+
+This library is free software;
+you may redistribute and/or modify it under the same
+terms as Perl itself.
+
+=cut
+
+# Local variables:
+# c-indentation-style: bsd
+# c-basic-offset: 4
+# indent-tabs-mode: nil
+# End:
+# vim: expandtab shiftwidth=4:
125 bin/cpanp
@@ -0,0 +1,125 @@
+#!/usr/bin/perl
+# $File: //depot/cpanplus/dist/bin/cpanp $
+# $Revision: #8 $ $Change: 8345 $ $DateTime: 2003/10/05 19:25:48 $
+
+use strict;
+use vars '$VERSION';
+
+use CPANPLUS;
+$VERSION = CPANPLUS->VERSION;
+
+use CPANPLUS::Shell qw[Default];
+my $shell = CPANPLUS::Shell->new;
+
+### if we're given a command, run it; otherwise, open a shell.
+if (@ARGV) {
+ ### take the command line arguments as a command
+ my $input = "@ARGV";
+ ### if they said "--help", fix it up to work.
+ $input = 'h' if $input =~ /^\s*--?h(?:elp)?\s*$/i;
+ ### strip the leading dash
+ $input =~ s/^\s*-//;
+ ### pass the command line to the shell
+ $shell->dispatch_on_input(input => $input, noninteractive => 1);
+} else {
+ ### open a shell for the user
+ $shell->shell();
+}
+
+=head1 NAME
+
+cpanp - The CPANPLUS launcher
+
+=head1 SYNOPSIS
+
+B<cpanp>
+
+B<cpanp> S<[-]B<a>> S<[ --[B<no>-]I<option>... ]> S< I<author>... >
+
+B<cpanp> S<[-]B<mfitulrcz>> S<[ --[B<no>-]I<option>... ]> S< I<module>... >
+
+B<cpanp> S<[-]B<d>> S<[ --[B<no>-]I<option>... ]> S<[ --B<fetchdir>=... ]> S< I<module>... >
+
+B<cpanp> S<[-]B<xb>> S<[ --[B<no>-]I<option>... ]>
+
+B<cpanp> S<[-]B<o>> S<[ --[B<no>-]I<option>... ]> S<[ I<module>... ]>
+
+=head1 DESCRIPTION
+
+This script launches the B<CPANPLUS> utility to perform various operations
+from the command line. If it's invoked without arguments, an interactive
+shell is executed by default.
+
+Optionally, it can take a single-letter switch and one or more argument,
+to perform the associated action on each arguments. A summary of the
+available commands is listed below; C<cpanp -h> provides a detailed list.
+
+ h # help information
+ v # version information
+
+ a AUTHOR ... # search by author(s)
+ m MODULE ... # search by module(s)
+ f MODULE ... # list all releases of a module
+
+ i MODULE ... # install module(s)
+ t MODULE ... # test module(s)
+ u MODULE ... # uninstall module(s)
+ d MODULE ... # download module(s)
+ l MODULE ... # display detailed information about module(s)
+ r MODULE ... # display README files of module(s)
+ c MODULE ... # check for module report(s) from cpan-testers
+ z MODULE ... # extract module(s) and open command prompt in it
+
+ x # reload CPAN indices
+
+ o [ MODULE ... ] # list installed module(s) that aren't up to date
+ b # write a bundle file for your configuration
+
+Each command may be followed by one or more I<options>. If preceded by C<no>,
+the corresponding option will be set to C<0>, otherwise it's set to C<1>.
+
+Example: To skip a module's tests,
+
+ cpanp -i --skiptest MODULE ...
+
+Valid options for most commands are C<cpantest>, C<debug>, C<flush>, C<force>,
+C<prereqs>, C<storable>, C<verbose>, C<md5>, C<signature>, and C<skiptest>; the
+'d' command also accepts C<fetchdir>. Please consult L<CPANPLUS::Configure>
+for an explanation to their meanings.
+
+Example: To download a module's tarball to the current directory,
+
+ cpanp -d --fetchdir=. MODULE ...
+
+=cut
+
+1;
+
+__END__
+
+=head1 SEE ALSO
+
+L<CPANPLUS>
+
+=head1 AUTHORS
+
+Richard Soderberg E<lt>perl@crystalflame.netE<gt>, Autrijus Tang E<lt>autrijus@autrijus.orgE<gt>
+
+=head1 COPYRIGHT
+
+Copyright 2001, 2002 by Autrijus Tang E<lt>autrijus@autrijus.orgE<gt>.
+Copyright 2004 by Richard Soderberg E<lt>perl@crystalflame.netE<gt>.
+
+This program is free software; you can redistribute it and/or
+modify it under the same terms as Perl itself.
+
+See L<http://www.perl.com/perl/misc/Artistic.html>
+
+=cut
+
+# Local variables:
+# c-indentation-style: bsd
+# c-basic-offset: 4
+# indent-tabs-mode: nil
+# End:
+# vim: expandtab shiftwidth=4:
119 bin/cpanp-boxed
@@ -0,0 +1,119 @@
+#!/usr/bin/perl -w
+
+### Setup a "Good" Copy of @INC to use at runtime, and a
+### temporary one to use at bootstrap time.
+BEGIN {
+ use strict;
+ use warnings;
+
+ use Config;
+ use FindBin;
+ use File::Spec;
+
+ use vars qw[@RUN_TIME_INC $LIB_DIR $BUNDLE_DIR $BASE $PRIV_LIB];
+ $LIB_DIR = File::Spec->catdir( $FindBin::Bin, qw[.. lib] );
+ $BUNDLE_DIR = File::Spec->catdir( $FindBin::Bin, qw[.. inc bundle] );
+
+ ### must set the PERL5LIB env var here as well, as some
+ ### code in CPANPLUS resets it between iterations. So we
+ ### have to set our 'final' perl5lib before loading any
+ ### CPANPLUS code. The constants code is 'safe' but better
+ ### safe than sorry. So duplicating the 'constants' behaviour
+ ### of DOT_CPANPLUS
+ # use CPANPLUS::Internals::Constants;
+ my $who = getlogin || getpwuid($<) || $<;
+ $BASE = File::Spec->catfile(
+ $FindBin::Bin, '..', '.cpanplus', $who);
+ $PRIV_LIB = File::Spec->catfile( $BASE, 'lib' );
+
+ @RUN_TIME_INC = ($LIB_DIR, $PRIV_LIB, @INC);
+ unshift @INC, $LIB_DIR, $BUNDLE_DIR;
+
+ ### set it in the environment too, for when we shell out
+ ### (like at 'perl makefile.pl' time.
+ $ENV{'PERL5LIB'} = join $Config{'path_sep'}, grep { defined }
+ $PRIV_LIB, # to find the boxed config
+ $LIB_DIR, # the CPANPLUS libs
+ $ENV{'PERL5LIB'}; # original PERL5LIB
+
+}
+
+use File::Find qw[find];
+use CPANPLUS::Error;
+use CPANPLUS::Configure;
+use CPANPLUS::Internals::Constants;
+use CPANPLUS::Internals::Utils;
+
+### now, load in all the .pms from the bundle dir, so they're in
+### memory. Skip the ones already loaded, and ignore failed requires.
+{ my $base_re = quotemeta $BUNDLE_DIR;
+
+ find( sub { my $file = $File::Find::name;
+ return unless -e $file && -f _ && -s _;
+
+ ### strip base dir. Might not end in / (or local
+ ### dir delimiter), so remove that if needed too
+ $file =~ s/^$base_re(\W)?//;
+
+ ### file already loaded.
+ return if $INC{$file};
+
+ ### construct pm name and strip suffix
+ my $pm = join '::', File::Spec->splitdir( $file );
+ $pm =~ s/\.pm$//i;
+
+ eval "require $pm ; 1";
+ ### dont enable warnings -- some modules
+ ### are OS specific. Uncomment only for debug
+ ### reasons
+ #warn $@ if $@;
+
+ }, $BUNDLE_DIR );
+
+ ### set @INC back to our non-bundled version
+ @INC = @RUN_TIME_INC;
+}
+
+### setup the configuration
+my $ConfObj = CPANPLUS::Configure->new;
+my $Config = 'CPANPLUS::Config::Boxed';
+my $Util = 'CPANPLUS::Internals::Utils';
+my $ConfigFile = $ConfObj->_config_pm_to_file( $Config => $PRIV_LIB );
+
+### setup the environment if needed
+{ ### no base dir even, set it up
+ unless( IS_DIR->( $BASE ) ) {
+ $Util->_mkdir( dir => $BASE ) or die CPANPLUS::Error->stack_as_string;
+ }
+
+ ### no config file exists yet, so we create it
+ unless( -e $ConfigFile ) {
+ ### alter what needs changing
+ $ConfObj->set_conf( base => $BASE ); # new base dir
+ $ConfObj->set_conf( verbose => 1 ); # be verbose
+ $ConfObj->set_conf( prereqs => 1 ); # install prereqs
+ $ConfObj->save( $Config => $PRIV_LIB ); # save the pm in that dir
+ }
+}
+
+print qq[
+===
+
+Your boxed CPANPLUS install is setup to use:
+ Basedir: $BASE
+ Config: $ConfigFile
+
+You can install all CPANPLUS dependencies by running:
+ i Bundle::CPANPLUS::Dependencies
+
+===
+ \n
+];
+
+### set the @INC to a runtime version, so our bundled modules
+### are 'hidden' from probing, but loaded already for 'use' and
+### 'require' statements
+
+{ $Module::Load::Conditional::CHECK_INC_HASH = 1;
+ do File::Spec->catfile( $FindBin::Bin, 'cpanp' ) or die "$! $@";
+}
119 dev-bin/copy-inc.pl
@@ -0,0 +1,119 @@
+use strict;
+use Cwd;
+use CPANPLUS::Backend;
+
+my $Prefix = '../../other/'; # updir from cpanplus/devel
+my $Libdir = 'lib/';
+my $Target = cwd() . '/inc/bundle'; # Target dir to copy to
+my $CB = CPANPLUS::Backend->new;
+my $MineOnly = @ARGV ? 1 : 0;
+
+$CB->configure_object->set_conf( verbose => 1 );
+
+### p4 open everything
+system("find $Target -type f | xargs p4 edit");
+
+### from p4
+{ my @Copy = qw[
+ archive-extract/
+ archive-tar-new/
+ file-fetch/
+ ipc-cmd/
+ log-message/
+ log-message-simple/
+ module-load/
+ module-loaded/
+ module-load-conditional/
+ object-accessor/
+ package-constants/
+ params-check/
+ term-ui/
+ ];
+
+ for my $entry (@Copy) {
+ my $dir = $Prefix . $entry . $Libdir;
+
+ print "Copying files from $entry...";
+ system("cp -R $dir $Target");
+ print "done\n";
+ }
+}
+
+
+
+### from installations
+unless( $MineOnly ) {
+ my @Modules = qw[
+ File::Spec
+ IO::String
+ IO::Zlib
+ IPC::Run
+ Locale::Maketext::Simple
+ Module::CoreList
+ Module::Pluggable
+ ];
+
+ for my $module ( @Modules ) {
+ print "Updating $module...";
+
+ my $obj = $CB->module_tree( $module );
+
+ $obj->fetch( fetchdir => '/tmp' ) or die "Could not fetch";
+ my $dir = $obj->extract( extractdir => '/tmp' )
+ or die "Could not extract";
+
+ ### either they have the lib structure
+ if( -d $dir . "/lib" ) {
+ chdir $dir . "/lib" or die "Could not chdir: $!";
+ system("cp -R . $Target") and die "Could not copy files";
+
+ print "done\n";
+ next;
+ }
+
+ ### ok, so no libdir... let's see if they have just the pm in
+ ### the topdir
+ chdir $dir or die "Could not chdir to $dir: $!";
+
+ my @parts = split '::', $module;
+ my $file = pop(@parts) . '.pm';
+ if ( -e $file ) {
+ my $to = $Target . '/' . join '/', @parts, $file;
+ system("cp $file $to") and die "Could not copy $file to $to: $!\n";
+
+ print "done\n";
+ next;
+ }
+
+ die "Dont know how to copy $module from $dir\n";
+
+ }
+}
+
+
+#
+# ### set all the versions to -1
+# if(0) {
+# for my $file ( map { chomp; $_ } `find $Target -type f` ) {
+# system( "p4 edit $file" );
+#
+# my $code = q[s/(\$|:)VERSION\s*=.+$/${1}VERSION = "-1";/];
+#
+# my $cmd = qq[$^X -pi -e'$code'];
+# print "Running [$cmd $file]\n";
+#
+# system( "$cmd $file" );
+# }
+# }
+
+### revert all that wasn't touched
+system("p4 revert -a");
+system("find $Target -type f | xargs p4 add");
+system("p4 diff | less");
+system("p4 submit");
+
+
+__END__
+find $dir -type f | xargs p4 edit
+p4 revert -a
+find $dir -type f | xargs p4 add
69 dev-bin/sandbox-test.pl
@@ -0,0 +1,69 @@
+use strict;
+use Data::Dumper;
+
+my $Target = "sandbox.$$"; # Target dir to copy to
+my $NoWhipe = @ARGV ? 1 : 0; # clean up afterwards?
+
+warn "\n\n\n\tBuilding in $Target\n\n\n";
+
+print "\n\n\t*** Making Dist***\n\n";
+system("$^X Makefile.PL JFDI=1");
+system("make dist");
+
+
+my $cmd = q[ls -1 | grep CPANPLUS | grep 'gz$'];
+chomp(my($tar) = `$cmd`);
+
+my $dir = $tar; $dir =~ s/\.tar\.gz//;
+
+
+print "\n\n\t*** Moving files to target dir***\n\n";
+### create a sandbox
+system("mkdir $Target");
+
+### move the tarfile
+system("mv $tar $Target");
+
+print "\n\n\t*** Extracting $tar***\n\n";
+### chdir & extract
+system("cd $Target; tar -zxvf $tar");
+
+### chdir to the dist dir
+system("cd $dir");
+
+print "\n\n\t*** Running Makefile.PL***\n\n";
+map { delete $ENV{$_} } grep /PERL/, keys %ENV;
+
+system("$^X Makefile.PL");
+system("make test");
+
+system("cd ../..");
+
+print "\n\n\t*** Cleaning up***\n\n";
+system("rm -rf $Target") unless $NoWhipe;
+
+
+__END__
+
+
+### p4 open everything
+system("find $Target -type f | xargs p4 edit");
+
+
+for my $entry (@Copy) {
+ my $dir = $Prefix . $entry . $Libdir;
+
+ system("cp -R $dir $Target");
+}
+
+### revert all that wasn't touched
+system("p4 revert -a");
+system("find $Target -type f | xargs p4 add");
+system("p4 diff | less");
+system("p4 submit");
+
+
+__END__
+find $dir -type f | xargs p4 edit
+p4 revert -a
+find $dir -type f | xargs p4 add
37 dev-bin/update-version.pl
@@ -0,0 +1,37 @@
+my $Ver = shift or die usage();
+
+my %Files = (
+ qq[s/VERSION\\s*=.*?;/VERSION = "$Ver";/]
+ => [qw[ lib/CPANPLUS.pm
+ lib/CPANPLUS/Internals.pm
+ lib/CPANPLUS/Shell/Default.pm
+ ]],
+ qq[s/version:.*\$/version: $Ver/]
+ => [qw[ META.yml]],
+);
+
+map { system( "p4 edit $_" ) } map { @$_ } values %Files;
+
+while( my($re,$aref) = each %Files ) {
+
+ for my $file (@$aref) {
+
+ my $cmd = qq[$^X -pi -e'$re'];
+ print "Running [$cmd $file]\n";
+
+ system( "$cmd $file" );
+ }
+}
+
+system("p4 diff | less");
+system("p4 submit");
+
+
+
+sub usage {
+ return qq[
+Usage:
+ $0 NEW_VERSION
+
+ ];
+}
169 inc/Module/Install.pm
@@ -0,0 +1,169 @@
+#line 1 "inc/Module/Install.pm - /usr/local/lib/perl5/site_perl/5.8.5/Module/Install.pm"
+package Module::Install;
+$VERSION = '0.36';
+
+die << "." unless $INC{join('/', inc => split(/::/, __PACKAGE__)).'.pm'};
+Please invoke ${\__PACKAGE__} with:
+
+ use inc::${\__PACKAGE__};
+
+not:
+
+ use ${\__PACKAGE__};
+
+.
+
+use strict 'vars';
+use Cwd ();
+use File::Find ();
+use File::Path ();
+
+@inc::Module::Install::ISA = 'Module::Install';
+*inc::Module::Install::VERSION = *VERSION;
+
+#line 129
+
+sub import {
+ my $class = shift;
+ my $self = $class->new(@_);
+
+ if (not -f $self->{file}) {
+ require "$self->{path}/$self->{dispatch}.pm";
+ File::Path::mkpath("$self->{prefix}/$self->{author}");
+ $self->{admin} =
+ "$self->{name}::$self->{dispatch}"->new(_top => $self);
+ $self->{admin}->init;
+ @_ = ($class, _self => $self);
+ goto &{"$self->{name}::import"};
+ }
+
+ *{caller(0) . "::AUTOLOAD"} = $self->autoload;
+
+ # Unregister loader and worker packages so subdirs can use them again
+ delete $INC{"$self->{file}"};
+ delete $INC{"$self->{path}.pm"};
+}
+
+#line 156
+
+sub autoload {
+ my $self = shift;
+ my $caller = caller;
+
+ my $cwd = Cwd::cwd();
+ my $sym = "$caller\::AUTOLOAD";
+
+ $sym->{$cwd} = sub {
+ my $pwd = Cwd::cwd();
+ if (my $code = $sym->{$pwd}) {
+ goto &$code unless $cwd eq $pwd; # delegate back to parent dirs
+ }
+ $$sym =~ /([^:]+)$/ or die "Cannot autoload $caller";
+ unshift @_, ($self, $1);
+ goto &{$self->can('call')} unless uc($1) eq $1;
+ };
+}
+
+#line 181
+
+sub new {
+ my ($class, %args) = @_;
+
+ return $args{_self} if $args{_self};
+
+ $args{dispatch} ||= 'Admin';
+ $args{prefix} ||= 'inc';
+ $args{author} ||= '.author';
+ $args{bundle} ||= 'inc/BUNDLES';
+
+ $class =~ s/^\Q$args{prefix}\E:://;
+ $args{name} ||= $class;
+ $args{version} ||= $class->VERSION;
+
+ unless ($args{path}) {
+ $args{path} = $args{name};
+ $args{path} =~ s!::!/!g;
+ }
+ $args{file} ||= "$args{prefix}/$args{path}.pm";
+
+ bless(\%args, $class);
+}
+
+#line 210
+
+sub call {
+ my $self = shift;
+ my $method = shift;
+ my $obj = $self->load($method) or return;
+
+ unshift @_, $obj;
+ goto &{$obj->can($method)};
+}
+
+#line 225
+
+sub load {
+ my ($self, $method) = @_;
+
+ $self->load_extensions(
+ "$self->{prefix}/$self->{path}", $self
+ ) unless $self->{extensions};
+
+ foreach my $obj (@{$self->{extensions}}) {
+ return $obj if $obj->can($method);
+ }
+
+ my $admin = $self->{admin} or die << "END";
+The '$method' method does not exist in the '$self->{prefix}' path!
+Please remove the '$self->{prefix}' directory and run $0 again to load it.
+END
+
+ my $obj = $admin->load($method, 1);
+ push @{$self->{extensions}}, $obj;
+
+ $obj;
+}
+
+#line 255
+
+sub load_extensions {
+ my ($self, $path, $top_obj) = @_;
+
+ unshift @INC, $self->{prefix}
+ unless grep { $_ eq $self->{prefix} } @INC;
+
+ local @INC = ($path, @INC);
+ foreach my $rv ($self->find_extensions($path)) {
+ my ($file, $pkg) = @{$rv};
+ next if $self->{pathnames}{$pkg};
+
+ eval { require $file; 1 } or (warn($@), next);
+ $self->{pathnames}{$pkg} = delete $INC{$file};
+ push @{$self->{extensions}}, $pkg->new( _top => $top_obj );
+ }
+}
+
+#line 279
+
+sub find_extensions {
+ my ($self, $path) = @_;
+ my @found;
+
+ File::Find::find(sub {
+ my $file = $File::Find::name;
+ return unless $file =~ m!^\Q$path\E/(.+)\.pm\Z!is;
+ return if $1 eq $self->{dispatch};
+
+ $file = "$self->{path}/$1.pm";
+ my $pkg = "$self->{name}::$1"; $pkg =~ s!/!::!g;
+ push @found, [$file, $pkg];
+ }, $path) if -d $path;
+
+ @found;
+}
+
+1;
+