BackupPC-users

Re: [BackupPC-users] Error installing BackupPC: - Bareword "compareLOGName" not allowed

2008-10-31 22:17:07
Subject: Re: [BackupPC-users] Error installing BackupPC: - Bareword "compareLOGName" not allowed
From: Holger Parplies <wbppc AT parplies DOT de>
To: "Jeffrey J. Kosowsky" <backuppc AT kosowsky DOT org>
Date: Sat, 1 Nov 2008 03:14:27 +0100
Hi,

I wrote on 2008-11-01 02:37:55 +0100 [Re: [BackupPC-users] Error installing 
BackupPC: - Bareword "compareLOGName" not allowed]:
> Jeffrey J. Kosowsky wrote on 2008-10-31 13:25:20 -0400 [[BackupPC-users] 
> Error installing BackupPC: - Bareword "compareLOGName" not allowed]:
> > [...]
> >     
> > 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!
> 
> [...]
> Actually, the original statement is passing both the subname "compareLOGName"
> and @files to the sort operator.

I should add that you, in contrast, are passing the result of the function call

        compareLOGName (@files)

to the sort operator. compareLOGName() does not use its argument list but
rather the global variables $a and $b and returns one integer value indicating
which of them is larger (and probably some warnings about $a and $b being
undefined) - my guess is -1. This value will then be sorted and returned to
whomever is requesting a sorted list of log file names. This is what you are
effectively doing:

        sub sortedPCLogFiles {
          return -1;
        }

I'm sure the result will be surprising ;-).

Regards,
Holger

-------------------------------------------------------------------------
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 AT lists.sourceforge DOT net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/

<Prev in Thread] Current Thread [Next in Thread>