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 /modules/WinProjectBase.pm | |
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 'modules/WinProjectBase.pm')
-rw-r--r-- | modules/WinProjectBase.pm | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/modules/WinProjectBase.pm b/modules/WinProjectBase.pm index 08ae89ba..4a2bc7bb 100644 --- a/modules/WinProjectBase.pm +++ b/modules/WinProjectBase.pm @@ -16,7 +16,7 @@ use strict; # Data Section # ************************************************************ -my($max_win_env) = 'MPC_MAX_WIN_FILE_LENGTH'; +my $max_win_env = 'MPC_MAX_WIN_FILE_LENGTH'; # ************************************************************ # Subroutine Section @@ -35,8 +35,7 @@ sub case_insensitive { sub translate_directory { - my($self) = shift; - my($dir) = shift; + my($self, $dir) = @_; ## Call the base class version $dir = $self->DirectoryManager::translate_directory($dir); @@ -49,10 +48,10 @@ sub translate_directory { ## limitation (including the cwd (- c:\) and object file name). So, we ## check the total length against a predetermined "acceptable" value. ## This acceptable value is modifiable through the environment. - my($maxenv) = $ENV{$max_win_env}; - my($maxlen) = (defined $maxenv && $maxenv =~ /^\d+$/ ? $maxenv : 128) + 3; - my($dirlen) = length($dir); - my($diff) = (length($self->getcwd()) + $dirlen + 1) - $maxlen; + my $maxenv = $ENV{$max_win_env}; + my $maxlen = (defined $maxenv && $maxenv =~ /^\d+$/ ? $maxenv : 128) + 3; + my $dirlen = length($dir); + my $diff = (length($self->getcwd()) + $dirlen + 1) - $maxlen; if ($diff > 0) { if ($diff > $dirlen) { @@ -70,8 +69,7 @@ sub translate_directory { sub validated_directory { - my($self) = shift; - my($dir) = shift; + my($self, $dir) = @_; ## $(...) could contain a drive letter and Windows can not ## make a directory that resembles a drive letter. So, we have @@ -86,8 +84,7 @@ sub validated_directory { sub crlf { - my($self) = shift; - return $self->windows_crlf(); + return $_[0]->windows_crlf(); } |