Win32::ShellExt - Perl module for implementing context menu extensions of the Windows Explorer
# Sample usage of that module: package Win32::ShellExt::QueryInfo::Txt; use strict; use Win32::ShellExt::QueryInfo; $Win32::ShellExt::QueryInfo::Txt::VERSION='0.1'; @Win32::ShellExt::QueryInfo::Txt::ISA=qw(Win32::ShellExt::QueryInfo); sub get_info_tip() { my $self = shift; "text file"; } sub hkeys() { my $h = { "CLSID" => "{7952ADC6-C81A-4A95-8605-732F97535CA7}", "extension" => "txt", "package" => "Win32::ShellExt::QueryInfo::Txt" }; $h; } 1;
This module is never used directly. You always subclass it into your own package, then do a one-time invocation of the install() method on your package (to install the needed registry keys). Then you should have a new entry in the contextual menu of the Windows explorer (the files for which this menu entry appears depend on the filtering you do in the query_context_menu method), and your action() method gets called upon clicking the corresponding menu command in the Explorer.
Note the additionnal hkey entry that modules deriving from Win32::ShellExt don't have: 'extension' this is used to set up the registry entries to tell explorer which kinds of files your extension works on.
None by default. None needed.
Jean-Baptiste Nivoit <jbnivoit@hotmail.com>
perl.
To install Win32::ShellExt, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Win32::ShellExt
CPAN shell
perl -MCPAN -e shell install Win32::ShellExt
For more information on module installation, please visit the detailed CPAN module installation guide.