From: <de...@de...> - 2010-03-24 21:18:32
|
Author: SpirosDenaxas Date: 2010-03-24 16:18:24 -0500 (Wed, 24 Mar 2010) New Revision: 18397 Trac url: http://develop.twiki.org/trac/changeset/18397 Modified: twiki/trunk/core/pseudo-install.pl Log: Item6408: added the warnings pragma to the script, check if a module path is defined before testing with the directory operator Modified: twiki/trunk/core/pseudo-install.pl =================================================================== --- twiki/trunk/core/pseudo-install.pl 2010-03-21 06:43:49 UTC (rev 18396) +++ twiki/trunk/core/pseudo-install.pl 2010-03-24 21:18:24 UTC (rev 18397) @@ -1,5 +1,6 @@ #!/usr/bin/perl use strict; +use warnings; use File::Path; use File::Copy; @@ -101,13 +102,20 @@ last; } } - $moduleDir =~ s#/+$##; - - unless (-d $moduleDir) { - print STDERR "--> Could not find $module\n"; - return; + + if ( defined $moduleDir ) { + $moduleDir =~ s#/+$##; + + unless (-d $moduleDir) { + print STDERR "--> Could not find $module\n"; + return; + } + + } else { + print STDERR "--> Could not find $module\n"; + return; } - + my $manifest = findRelativeTo("$moduleDir/lib/TWiki/$subdir/$module/",'MANIFEST'); if( -e "$manifest" ) { |