Main Site Contents Up Previous Next

Rules - Patch

Some modules do not work correctly when not run via the named perl executable within a full perl installation. In some cases you may be able to fix this by patching the module as it is packaged.

You can create specific patches to apply to specific versions of the module. When you create a new patch you are prompted to enter a module version. You can enter a module version string or you can enter 'DEFAULT'.

When Cava Packager encounters the module, it determines which patch version to use by taking the highest patch version that is equal to or less than the module version. Comparison is done on a string basis. If no number match is found, Cava Packager will fall back to the patch marked 'DEFAULT' if one exists.

You can create a single patch that will apply to any version of a module if you define its version as 'DEFAULT'.

You can copy and paste patches you have created into the window, or you can use Cava Packager to create a patch by using the edit button. Cava Packager will prompt for and open the base module in an edit window. You can edit the code and save your differences as a patch in the Cava application.

Note that Cava Packager uses the Text::Patch module to apply patches. This works perfectly if your patch is prepared directly against the version of the module you are patching. However, it will not perform vague or fuzzy matching like many command line patch utilities. If your patch was prepared against a different version of the module you are patching, then any line offsets will cause the patch to fail. This will be reported in the build log.

If you wish you can select an external patch executable to use instead which may provide more features such as fuzzy or offset matching. You can set an external patch executable in Global Preferences.

Contents Up Previous Next

Cava Packager Copyright © 2006-2012 Mark Dootson