Scroll to navigation

Getopt::Complete::Cache(3pm) User Contributed Perl Documentation Getopt::Complete::Cache(3pm)


Getopt::Complete::Cache - cache options next-to the command they apply-to


This document describes Getopt::Complete::Cache 0.26.


Presuming isa Command, and "myapp" is an executable like:

    use MyApp;

Add this BEFORE using the MyApp module:

    use Getopt::Complete::Cache class => 'MyApp';
    use MyApp;

Now the shell will look for during completion and will never actually load the module during tab-completion.

The .opts file is autogenerated upon the first attempt to find it.


This module is for the obscure case in which: 1. the compile time on an executable is sluggish, and we don't want to have sluggish tab-completion 2. the command-line should be cached relative to a given module name

This is most useful with classes implementing the API. Since these modules may form a large command tree, the caching occurs at individual levels in the tree separately.

2015-05-31 perl v5.20.2