Apache::TestMM



Apache::TestMM

NAME
SYNOPSIS
DESCRIPTION
FUNCTIONS

NAME

Apache::TestMM − Provide MakeMaker Wrapper Methods

SYNOPSIS

  require Apache::TestMM;
  # import MY::test and MY::clean overrides for MM
  Apache::TestMM−>import(qw(test clean));
  # parse command line args
  Apache::TestMM::filter_args();
  # autogenerate the script
  Apache::TestMM::generate_script('t/TEST');

DESCRIPTION

"Apache::TestMM" provides wrappers for the "ExtUtils::MakeMaker" craft, making it easier to extend the autogenerated Makefile with "Apache::Test".

FUNCTIONS

"import"

  use Apache::TestMM qw(test clean);

or:

  Apache::TestMM−>import(qw(test clean));

Imports "MY::" overrides for the default "ExtUtils::MakeMaker" test and clean targets, as if you have defined:

  sub MY::test {...}
  sub MY::clean {...}

in Makefile.PL. "Apache::TestMM" does this for you so that these Makefile targets will run the Apache server and the tests for it, and clean up after its mess.

"filter_args"

  push @ARGV, '−apxs', $apxs_path;
  Apache::TestMM::filter_args();
  WriteMakefile(...);

When "WriteMakefile()" is called it parses @ARGV, hoping to find special options like "PREFIX=/home/stas/perl". "Apache::Test" accepts a lot of configuration options of its own. When "Apache::TestMM::filter_args()" is called, it removes any "Apache::Test"−specific options from @ARGV and stores them internally, so when "WriteMakefile()" is called they aren’t in @ARGV and thus won’t be processed by "WriteMakefile()".

The options can be set when Makefile.PL is called:

  % perl Makefile.PL −apxs /path/to/apxs

Or you can push them manually to @ARGV from the code:

  push @ARGV, '−apxs', $apxs_path;

When:

  Apache::TestMM::generate_script('t/TEST');

is called, "Apache::Test"−specific options extracted by "Apache::TestMM::filter_args()" are written to the autogenerated file. In our example, the autogenerated t/TEST will include:

  %Apache::TestConfig::Argv = qw(apxs /path/to/apxs);

which is going to be used by the "Apache::Test" runtime.

The other frequently used options are: "−httpd", telling where to find the httpd (usually when the "−apxs" option is not used), "−libmodperl" to use a specific mod_perl shared object (if your mod_perl is built as DSO ), "−maxclients" to change the default number of the configured "MaxClients" directive, "−port" to start the server on a specific port, etc. To get the complete list of available configuration options and their purpose and syntax, run:

  % perl −MApache::TestConfig −le 'Apache::TestConfig::usage()'

You may wish to document some of these in your application’s README file, especially the "−apxs" and "−httpd" options.

"generate_script"

  Apache::TestMM::generate_script('t/TEST');

"generate_script()" accepts the name of the script to generate and will look for a template with the same name and suffix .PL. So in our example it’ll look for t/TEST.PL. The autogenerated script t/TEST will include the contents of t/TEST.PL, and special directives, including any configuration options passed via "filter_args()" called from Makefile.PL, special fixup code, etc.






Opportunity


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


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.





Free Books


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.





Education


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.