CPANPLUS::Hacking
This document attempts to describe how to develop with the CPANPLUS environment most easily, how certain things work and why.
This is basically a quick-start guide to people who want to add features or patches to CPANPLUS .
Checkout CPANPLUS from its Subversion repository at http://oss.dwim.org/cpanplus−devel <http://oss.dwim.org/cpanplus-devel> .
CPANPLUS follows the standard perl module installation process:
perl Makefile.PL
make
make test
make install
When running "perl Makefile.PL" you will be prompted to configure. If you have already done so, and merely wish to update the "Makefile", simply run:
perl Makefile.PL JFDI=1
This will keep your configuration intact. Note however, if there are changes to the default configuration file "Config.pm−orig", you should either delete your current config file and reconfigure, or patch your config file from the new entries in "Config.pm−orig".
If you’d rather not install the development version to your "site_perl" directory, that’s no problem. You can set your "PERL5LIB" environment variable to CPANPLUS ’ "lib" directory, and you can run it from there.
Tests are what tells us if CPANPLUS is working. If a test is not working, try to run it explicitly like this:
perl −I/path/to/cpanplus/lib t/XX_name_of_test.t 1
The extra ’1’ makes sure that all the messages and errors (they might be errors we’re testing for!) are being printed rather than kept quiet. This is a great way to find out the context of any failures that may occur.
If you believe this test failure proves a bug in CPANPLUS , the long output of the test file is something we’d like to see alongside your bug report.
Sometimes you might find bugs in CPANPLUS ’ behaviour. If you encounter these in a development snapshot, we’d appreciate a complete patch (as described below in the " SENDING PATCHES " section.
If it’s way over your head, then of course reporting the bug is always better than not reporting it at all. Before you do so though, make sure you have the latest development snapshot, and the bug still persists there. If so, report the bug to this address:
cpanplus−devel@lists.sourceforge.net
A good
"patch" would have the following
characteristics:
Problem description
Describe clearly what the bug is you found, and what it should have done instead.
Program demonstrating the bug
Show us how to reproduce the bug, in a simple of a program as possible
[ OPTIONAL ] A patch to the test suite to test for the bug
Amend our test suite by making sure this bug will be found in this, and future versions of CPANPLUS (see " SUPPLYING PATCHES ")
[ OPTIONAL ] A patch to the code + tests + documentation
Fix the bug, update the docs & tests. That way your bug will be gone forever :)
Patches are a good thing, and they are welcome. Especially if they fix bugs you’ve found along the way, or that others have reported.
We prefer patches in the following format:
• |
In "diff −u" or "diff −c" format | ||
• |
From the root of the snapshot | ||
• |
Including patches for code + tests + docs | ||
• |
Sent per mail to cpanplus−devel@lists.sourceforge.net | ||
• |
With subject containing "[PATCH]" + description of the patch |
You will always be informed if a patch is applied or rejected, and in case of rejection why that is (perhaps you can tweak the patch to have it accepted after all).
Personal Opportunity - Free software gives you access to billions of dollars of software at no cost. Use this software for your business, personal use or to develop a profitable skill. Access to source code provides access to a level of capabilities/information that companies protect though copyrights. Open source is a core component of the Internet and it is available to you. Leverage the billions of dollars in resources and capabilities to build a career, establish a business or change the world. The potential is endless for those who understand the opportunity.
Business Opportunity - Goldman Sachs, IBM and countless large corporations are leveraging open source to reduce costs, develop products and increase their bottom lines. Learn what these companies know about open source and how open source can give you the advantage.
Free Software provides computer programs and capabilities at no cost but more importantly, it provides the freedom to run, edit, contribute to, and share the software. The importance of free software is a matter of access, not price. Software at no cost is a benefit but ownership rights to the software and source code is far more significant.
Free Office Software - The Libre Office suite provides top desktop productivity tools for free. This includes, a word processor, spreadsheet, presentation engine, drawing and flowcharting, database and math applications. Libre Office is available for Linux or Windows.
The Free Books Library is a collection of thousands of the most popular public domain books in an online readable format. The collection includes great classical literature and more recent works where the U.S. copyright has expired. These books are yours to read and use without restrictions.
Source Code - Want to change a program or know how it works? Open Source provides the source code for its programs so that anyone can use, modify or learn how to write those programs themselves. Visit the GNU source code repositories to download the source.
Study at Harvard, Stanford or MIT - Open edX provides free online courses from Harvard, MIT, Columbia, UC Berkeley and other top Universities. Hundreds of courses for almost all major subjects and course levels. Open edx also offers some paid courses and selected certifications.
Linux Manual Pages - A man or manual page is a form of software documentation found on Linux/Unix operating systems. Topics covered include computer programs (including library and system calls), formal standards and conventions, and even abstract concepts.