Skip to content

Commit 41aa025

Browse files
committed
Add subsection about user-defined extension directories
Signed-off-by: Frank Terbeck <[email protected]>
1 parent 29b699a commit 41aa025

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

arename.in

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1681,6 +1681,35 @@ discrepancies between an extension module and the `ARename.pm' core module.
16811681

16821682
=back
16831683

1684+
=head2 User-defined Extensions
1685+
1686+
Say you have decided, that the `I<ARename::Extension::register()>' idea to
1687+
encapsulate extensions is a good idea and now you want to do that yourself,
1688+
too. Maybe because, you just like to keep your `hooks' file tidy or maybe
1689+
because you want to contribute your awesome extension code back to
1690+
B<arename>. Either way, you will need a place to put your Perl code.
1691+
1692+
B<Arename> does B<NOT> set such a place by default. But it is very easy to set
1693+
it yourself from the `hooks' file:
1694+
1695+
BEGIN {
1696+
unshift @INC, $ENV{HOME} . q{/.arename};
1697+
}
1698+
1699+
That way you can place Perl modules into `I<~/.arename>' like this:
1700+
1701+
~/.arename/ARename/MyAwesomeExtension.pm
1702+
1703+
And then just use it like the bundled extensions:
1704+
1705+
use ARename::MyAwesomeExtension.pm;
1706+
ARename::MyAwesomeExtension::register();
1707+
1708+
Take a look at the `B<KillNonASCII.pm.in>' file in the `B<arename>' sources,
1709+
for details about how to write proper extensions and how to make them
1710+
configurable and how to make use of the bundled utilities to make your
1711+
extension appropriate for inclusion with `B<arename>'.
1712+
16841713
=head1 SEE ALSO
16851714

16861715
B<find(1)>, B<xargs(1)>, B<perldoc(1)>, B<Audio::Scan>.

0 commit comments

Comments
 (0)