[vhffs-dev] [GIT] vhffs4/vhffs.git branch, master, updated. b54b9e906fd8e1238cfe7203a1a4f5cca7dd5009

[ Thread Index | Date Index | More vhffs.org/vhffs-dev Archives ]


This is an automated email from git. It was enerated because a ref
change was pushed to the repository "vhffs4/vhffs.git".

The branch, master has been updated
       via  b54b9e906fd8e1238cfe7203a1a4f5cca7dd5009 (commit)
      from  5ffccdf35664ceea7e2c67cd964520b5fad6fe1a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit b54b9e906fd8e1238cfe7203a1a4f5cca7dd5009
Author: Sylvain Rochet <gradator@xxxxxxxxxxxx>
Date:   Sat Apr 9 15:03:56 2016 +0000

    Robots: Pgsql: fix precedence issue with control flow operator
    
    return control flow operator have precedence over or operator, so
    return $a or $b; is interpreted as (return $a) or $b; which is
    effectively just return $a.
    
    Fixes that by removing the useless "or return 1;" which was always
    wrong because pgsql_admin_db_connect is used as such:
    
    my $dbi = pgsql_admin_db_connect( $vhffs );
    return unless $dbi;
    
    For the record, it now triggers a warning on recent Perl version:
    
    Possible precedence issue with control flow operator at
            /usr/share/vhffs/api/Vhffs/Robots/Pgsql.pm line 49 (#1)
        (W syntax) There is a possible problem with the mixing of a control
        flow operator (e.g. return) and a low-precedence operator like
        or.  Consider:
    
            sub { return $a or $b; }
    
        This is parsed as:
    
            sub { (return $a) or $b; }
    
        Which is effectively just:
    
            sub { return $a; }
    
        Either use parentheses or the high-precedence variant of the operator.
    
        Note this may be also triggered for constructs like:
    
            sub { 1 if die; }

-----------------------------------------------------------------------

Summary of changes:
 vhffs-api/src/Vhffs/Robots/Pgsql.pm |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


hooks/post-receive
--
vhffs4/vhffs.git



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/