Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
83 lines (75 sloc) 2.5 KB
__NAME__ purpose
check existence of a capability
__END__
__NAME__ see also
Require,Suggest
__END__
__NAME__ synopsis
<group choice='plain'>
<arg choice='plain' rep='repeat'>
<replaceable>type</replaceable>
<replaceable>type-specific-value</replaceable>
</arg>
</group>
__END__
__NAME__ description
Just like &conf-Require; or &conf-Capability;, this directive checks for
a feature or capability. When the tested feature is missing, a
warning message is shown.
</para><para>
"Capabilities" you can suggest are:
<itemizedlist>
<listitem><para>
<literal>globalsub</literal> &mdash; existence of a &conf-GlobalSub;
</para></listitem>
<listitem><para>
<literal>sub</literal> &mdash; existence of a &conf-Sub;
</para></listitem>
<listitem><para>
<literal>taggroup</literal> &mdash; existence of a &conf-TagGroup;
</para></listitem>
<listitem><para>
<literal>usertag</literal> &mdash; existence of a &conf-UserTag;
</para></listitem>
<listitem><para>
<literal>module (or perlmodule)</literal> &mdash; existence of a &PERL; module. Optional additional argument is the custom Perl module path.
</para></listitem>
<listitem><para>
<literal>include (or perlinclude)</literal> &mdash; prepend specified path to &PERL;'s <varname>@INC</varname> include path (makes most sense with &conf-Require;, not with &conf-Suggest; or &conf-Capability; even though it <emphasis>can</emphasis> be called that way for equivalent effect)
</para></listitem>
<listitem><para>
<literal>file</literal> &mdash; existence of a readable file
</para></listitem>
<listitem><para>
<literal>executable</literal> &mdash; existence of an executable file
</para></listitem>
</itemizedlist>
__END__
__NAME__ example: Suggesting existence of all supported items
<programlisting>
__FILENAME__ globalsub my_global_sub
__FILENAME__ sub my_sub
__FILENAME__ taggroup :group1,:group2 :group3
__FILENAME__ usertag my_global_usertag
__FILENAME__ usertag my_catalog_usertag
__FILENAME__ module Archive::Zip
__FILENAME__ module Set::Crontab /usr/local/perl/modules/
__FILENAME__ file /etc/syslog.conf
__FILENAME__ file relative-dir/file
__FILENAME__ executable /usr/local/bin/gfont
__FILENAME__ executable bin/gfont
</programlisting>
__END__
__NAME__ example: Testing for existence of old-style Perl modules
<programlisting>
__FILENAME__ module /path/to/module.pl
</programlisting>
__END__
__NAME__ example: Testing for features
<programlisting>
Suggest module Archive::Zip
Suggest usertag table_editor
Suggest globalsub file_info
Suggest module Business::UPS
</programlisting>
__END__
Something went wrong with that request. Please try again.