diff options
author | elliott_c <ocielliottc@users.noreply.github.com> | 2008-06-17 17:15:26 +0000 |
---|---|---|
committer | elliott_c <ocielliottc@users.noreply.github.com> | 2008-06-17 17:15:26 +0000 |
commit | 1cde0c244a5bbe5a88390b327f5da3eae47909bb (patch) | |
tree | 311b150f6dfa06c7f34ece13f68435ea93105ff7 /registry.pl | |
parent | 821e676d9ff0c53f73f99ed68bd0113bd3c62add (diff) | |
download | MPC-1cde0c244a5bbe5a88390b327f5da3eae47909bb.tar.gz |
ChangeLogTag: Tue Jun 17 17:16:07 UTC 2008 Chad Elliott <elliott_c@ociweb.com>
Diffstat (limited to 'registry.pl')
-rwxr-xr-x | registry.pl | 56 |
1 files changed, 26 insertions, 30 deletions
diff --git a/registry.pl b/registry.pl index de8dbe14..021d484c 100755 --- a/registry.pl +++ b/registry.pl @@ -21,27 +21,26 @@ use File::Basename; # Data Section # ****************************************************************** -my($Registry) = undef; -my($MPC_ROOT) = $FindBin::Bin; +my $Registry; +my $MPC_ROOT = $FindBin::Bin; $MPC_ROOT =~ s!/!\\!g; -my($version) = '1.3'; -my(%types) = ('nmake' => ['NMAKE', 'NMAKE'], - 'bmake' => ['Borland Make', 'Borland Make'], - 'vc6' => ['DSW', 'DSP'], - 'vc71' => ['SLN 7.1', 'VCPROJ 7.1'], - 'vc8' => ['SLN 8.0', 'VCPROJ 8.0'], - 'vc9' => ['SLN 9.0', 'VCPROJ 9.0'], - ); +my $version = '1.3'; +my %types = ('nmake' => ['NMAKE', 'NMAKE'], + 'bmake' => ['Borland Make', 'Borland Make'], + 'vc6' => ['DSW', 'DSP'], + 'vc71' => ['SLN 7.1', 'VCPROJ 7.1'], + 'vc8' => ['SLN 8.0', 'VCPROJ 8.0'], + 'vc9' => ['SLN 9.0', 'VCPROJ 9.0'], + ); # ****************************************************************** # Subroutine Section # ****************************************************************** sub set_ext_icon { - my($ext) = shift; - my($num) = shift; - my($extf) = $ext . 'file'; + my($ext, $num) = @_; + my $extf = $ext . 'file'; $Registry->{"HKEY_CLASSES_ROOT/.$ext/"} = {'/' => $extf}; $Registry->{"HKEY_CLASSES_ROOT/$extf/"} = {}; $Registry->{"HKEY_CLASSES_ROOT/$extf/DefaultIcon/"} = @@ -50,17 +49,16 @@ sub set_ext_icon { sub set_dir_command { - my($type) = shift; - my($desc) = shift; - my($shell) = 'HKEY_CLASSES_ROOT/Directory/shell'; - my($hash) = $Registry->{$shell}; + my($type, $desc) = @_; + my $shell = 'HKEY_CLASSES_ROOT/Directory/shell'; + my $hash = $Registry->{$shell}; if (!defined $hash) { $Registry->{$shell} = {}; $hash = $Registry->{$shell}; } - my($key) = 'MPC' . uc($type) . '/'; + my $key = 'MPC' . uc($type) . '/'; $hash->{$key} = {'/' => "MPC -> $desc"}; $key .= 'command/'; @@ -69,17 +67,16 @@ sub set_dir_command { sub set_mwc_command { - my($type) = shift; - my($desc) = shift; - my($shell) = 'HKEY_CLASSES_ROOT/mwcfile/shell'; - my($hash) = $Registry->{$shell}; + my($type, $desc) = @_; + my $shell = 'HKEY_CLASSES_ROOT/mwcfile/shell'; + my $hash = $Registry->{$shell}; if (!defined $hash) { $Registry->{$shell} = {}; $hash = $Registry->{$shell}; } - my($key) = 'MPC' . uc($type) . '/'; + my $key = 'MPC' . uc($type) . '/'; $hash->{$key} = {'/' => "MPC -> $desc"}; $key .= 'command/'; @@ -90,17 +87,16 @@ sub set_mwc_command { sub set_mpc_command { - my($type) = shift; - my($desc) = shift; - my($shell) = 'HKEY_CLASSES_ROOT/mpcfile/shell'; - my($hash) = $Registry->{$shell}; + my($type, $desc) = @_; + my $shell = 'HKEY_CLASSES_ROOT/mpcfile/shell'; + my $hash = $Registry->{$shell}; if (!defined $hash) { $Registry->{$shell} = {}; $hash = $Registry->{$shell}; } - my($key) = 'MPC' . uc($type) . '/'; + my $key = 'MPC' . uc($type) . '/'; $hash->{$key} = {'/' => "MPC -> $desc"}; $key .= 'command/'; @@ -109,8 +105,8 @@ sub set_mpc_command { sub delete_key { - my($key) = shift; - my($val) = $Registry->{$key}; + my $key = shift; + my $val = $Registry->{$key}; if (UNIVERSAL::isa($val, 'HASH')) { foreach my $k (keys %$val) { |