Edit D:\app\Administrator\product\11.2.0\dbhome_1\perl\html\lib\CPANPLUS\Dist\Base.html
<?xml version="1.0" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>CPANPLUS::Dist::Base - Base class for custom distribution classes</title> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <link rev="made" href="mailto:" /> </head> <body style="background-color: white"> <table border="0" width="100%" cellspacing="0" cellpadding="3"> <tr><td class="block" style="background-color: #cccccc" valign="middle"> <big><strong><span class="block"> CPANPLUS::Dist::Base - Base class for custom distribution classes</span></strong></big> </td></tr> </table> <!-- INDEX BEGIN --> <div name="index"> <p><a name="__index__"></a></p> <ul> <li><a href="#name">NAME</a></li> <li><a href="#synopsis">SYNOPSIS</a></li> <li><a href="#description">DESCRIPTION</a></li> <li><a href="#flow">FLOW</a></li> <li><a href="#methods">METHODS</a></li> <ul> <li><a href="#_bool____class__format_available">$bool = $Class->format_available</a></li> <li><a href="#_bool____dist__init">$bool = $dist->init</a></li> <li><a href="#_bool____dist__prepare">$bool = $dist->prepare</a></li> <li><a href="#_bool____dist__create">$bool = $dist->create</a></li> <li><a href="#_bool____dist__install">$bool = $dist->install</a></li> <li><a href="#_bool____dist__uninstall">$bool = $dist->uninstall</a></li> </ul> </ul> <hr name="index" /> </div> <!-- INDEX END --> <p> </p> <h1><a name="name">NAME</a></h1> <p>CPANPLUS::Dist::Base - Base class for custom distribution classes</p> <p> </p> <hr /> <h1><a name="synopsis">SYNOPSIS</a></h1> <pre> package CPANPLUS::Dist::MY_IMPLEMENTATION</pre> <pre> use base 'CPANPLUS::Dist::Base';</pre> <pre> sub prepare { my $dist = shift; ### do the 'standard' things $dist->SUPER::prepare( @_ ) or return; ### do MY_IMPLEMENTATION specific things ... ### don't forget to set the status! return $dist->status->prepared( $SUCCESS ? 1 : 0 ); }</pre> <p> </p> <hr /> <h1><a name="description">DESCRIPTION</a></h1> <p>CPANPLUS::Dist::Base functions as a base class for all custom distribution implementations. It does all the mundane work CPANPLUS would have done without a custom distribution, so you can override just the parts you need to make your own implementation work.</p> <p> </p> <hr /> <h1><a name="flow">FLOW</a></h1> <p>Below is a brief outline when and in which order methods in this class are called:</p> <pre> $Class->format_available; # can we use this class on this system?</pre> <pre> $dist->init; # set up custom accessors, etc $dist->prepare; # find/write meta information $dist->create; # write the distribution file $dist->install; # install the distribution file $dist->uninstall; # remove the distribution (OPTIONAL)</pre> <p> </p> <hr /> <h1><a name="methods">METHODS</a></h1> <p> </p> <h2><a name="_bool____class__format_available">$bool = $Class->format_available</a></h2> <p>This method is called when someone requests a module to be installed via the superclass. This gives you the opportunity to check if all the needed requirements to build and install this distribution have been met.</p> <p>For example, you might need a command line program, or a certain perl module installed to do your job. Now is the time to check.</p> <p>Simply return true if the request can proceed and false if it can not.</p> <p>The <code>CPANPLUS::Dist::Base</code> implementation always returns true.</p> <p> </p> <h2><a name="_bool____dist__init">$bool = $dist->init</a></h2> <p>This method is called just after the new dist object is set up and before the <code>prepare</code> method is called. This is the time to set up the object so it can be used with your class.</p> <p>For example, you might want to add extra accessors to the <code>status</code> object, which you might do as follows:</p> <pre> $dist->status->mk_accessors( qw[my_implementation_accessor] ); The C<status> object is implemented as an instance of the C<Object::Accessor> class. Please refer to it's documentation for details. Return true if the initialization was successul, and false if it was not. The C<CPANPLUS::Dist::Base> implementation does not alter your object and always returns true.</pre> <p> </p> <h2><a name="_bool____dist__prepare">$bool = $dist->prepare</a></h2> <p>This runs the preparation step of your distribution. This step is meant to set up the environment so the <code>create</code> step can create the actual distribution(file). A <code>prepare</code> call in the standard <code>ExtUtils::MakeMaker</code> distribution would, for example, run <code>perl Makefile.PL</code> to find the dependencies for a distribution. For a <code>debian</code> distribution, this is where you would write all the metafiles required for the <code>dpkg-*</code> tools.</p> <p>The <code>CPANPLUS::Dist::Base</code> implementation simply calls the underlying distribution class (Typically <code>CPANPLUS::Dist::MM</code> or <code>CPANPLUS::Dist::Build</code>).</p> <p>Sets <code>$dist->status->prepared</code> to the return value of this function. If you override this method, you should make sure to set this value.</p> <p> </p> <h2><a name="_bool____dist__create">$bool = $dist->create</a></h2> <p>This runs the creation step of your distribution. This step is meant to follow up on the <code>prepare</code> call, that set up your environment so the <code>create</code> step can create the actual distribution(file). A <code>create</code> call in the standard <code>ExtUtils::MakeMaker</code> distribution would, for example, run <code>make</code> and <code>make test</code> to build and test a distribution. For a <code>debian</code> distribution, this is where you would create the actual <code>.deb</code> file using <code>dpkg</code>.</p> <p>The <code>CPANPLUS::Dist::Base</code> implementation simply calls the underlying distribution class (Typically <code>CPANPLUS::Dist::MM</code> or <code>CPANPLUS::Dist::Build</code>).</p> <p>Sets <code>$dist->status->dist</code> to the location of the created distribution. If you override this method, you should make sure to set this value.</p> <p>Sets <code>$dist->status->created</code> to the return value of this function. If you override this method, you should make sure to set this value.</p> <p> </p> <h2><a name="_bool____dist__install">$bool = $dist->install</a></h2> <p>This runs the install step of your distribution. This step is meant to follow up on the <code>create</code> call, which prepared a distribution(file) to install. A <code>create</code> call in the standard <code>ExtUtils::MakeMaker</code> distribution would, for example, run <code>make install</code> to copy the distribution files to their final destination. For a <code>debian</code> distribution, this is where you would run <code>dpkg --install</code> on the created <code>.deb</code> file.</p> <p>The <code>CPANPLUS::Dist::Base</code> implementation simply calls the underlying distribution class (Typically <code>CPANPLUS::Dist::MM</code> or <code>CPANPLUS::Dist::Build</code>).</p> <p>Sets <code>$dist->status->installed</code> to the return value of this function. If you override this method, you should make sure to set this value.</p> <p> </p> <h2><a name="_bool____dist__uninstall">$bool = $dist->uninstall</a></h2> <p>This runs the uninstall step of your distribution. This step is meant to remove the distribution from the file system. A <code>uninstall</code> call in the standard <code>ExtUtils::MakeMaker</code> distribution would, for example, run <code>make uninstall</code> to remove the distribution files the file system. For a <code>debian</code> distribution, this is where you would run <code>dpkg --uninstall PACKAGE</code>.</p> <p>The <code>CPANPLUS::Dist::Base</code> implementation simply calls the underlying distribution class (Typically <code>CPANPLUS::Dist::MM</code> or <code>CPANPLUS::Dist::Build</code>).</p> <p>Sets <code>$dist->status->uninstalled</code> to the return value of this function. If you override this method, you should make sure to set this value.</p> <table border="0" width="100%" cellspacing="0" cellpadding="3"> <tr><td class="block" style="background-color: #cccccc" valign="middle"> <big><strong><span class="block"> CPANPLUS::Dist::Base - Base class for custom distribution classes</span></strong></big> </td></tr> </table> </body> </html>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de