Holger Parplies wrote at about 02:37:55 +0100 on Saturday, November 1, 2008: > Hi, > > Jeffrey J. Kosowsky wrote on 2008-10-31 13:25:20 -0400 [[BackupPC-users] > Error installing BackupPC: - Bareword "compareLOGName" not allowed]: > > > > When I run config.pl, I get the following error message: > > > > Error loading BackupPC::Lib: Bareword "compareLOGName" not allowed > > while "strict subs" in use at lib/BackupPC/Lib.pm line 1466. > > [...] > > > > I was able to fix this by changing the line near the end from: > > return sort(compareLOGName @files); > > To: > > return sort(compareLOGName( @files)); > > err, NO! > > That one is a little subtle. If your change were correct, the Perl compiler > would not have complained (sub compareLOGName was declared before this point, > so a function call "compareLOGName @files" should not have parsed as a > bareword > but rather as a list operator). >
OK. But my change (though wrong) did stop the warning messages and compiled ... > Actually, the original statement is passing both the subname "compareLOGName" > and @files to the sort operator. I don't know why Perl 5.10.0 complains about > that. I would first try leaving out the () > > return sort compareLOGName @files; > This seems to work (well at least it doesn't generate the error... > (actually, this gets rid of a warning (!) in 5.8.8, so I would suggest this > to > be changed anyway) and, if that doesn't help, something like > > my $comparison = \&compareLOGName; > return sort($comparison @files); > > Regards, > Holger Well the change seems to be definitely necessary for later versions so might as well do the (first) one you propose... ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List: https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki: http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/