Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 5 of 5
  1. #1
    Senior Member
    Join Date
    Jul 2009
    Location
    Bristol, UK
    Posts
    473

    hash as a reference is deprecated - InguzEQ plugin.pm

    I am using the Inguz DRC plugin which doesn't seem to be supported by the developer, so I would appreciated some guidance. (My knowledge of Perl is zero, so please bear with me if what I write is daft.)

    At the moment Inguz works fine but with the Perl version I am using (5.18) the following warning i3 thrown up.

    Code:
    Warning: [23:26:24.6540] Using a hash as a reference is deprecated at /usr/share/squeezeboxserver/Plugins/InguzEQ/Plugin.pm line 3138.
    My understanding is that this will cause a fatal error in Perl 5.22.

    The line is:

    Code:
    $request->addResultLoop( 'Points_loop', $cnt, $ff, %h->{$ff} );
    From what I can gather from searching on google, the likely culprit is: %h->{$ff}

    Should this be re-written as the following, or is it more complicated than that: $h{$ff}

    Any thoughts would be very welcome indeed.


    In case it would help, this is part of the code surrounding the offending line:

    Code:
    foreach my $v ( @pts )
    {
    	my @vv = @$v;
    	foreach my $f( @vv )
    	{
    		my %h = %$f;
    		foreach my $ff( keys %h )
    		{
    			$request->addResultLoop( 'Points_loop', $cnt, $ff, %h->{$ff} );
    			$cnt++;
    		}
    	}
    }
    Last edited by JohnB; 2017-08-05 at 09:27.
    Touch, Meridian G92, Bryston B4 SST2, PMC OB1i speakers, HP Proliant Microserver/Ubuntu, PC/Windows 7, iPad 4, iPeng, Squeezepad.

  2. #2
    Senior Member
    Join Date
    Jul 2009
    Location
    Bristol, UK
    Posts
    473
    In (partial?) answer to my own question:

    I made the change I mentioned in my previous post (after backing up the original file, of course) and the change might well have worked.

    There is no "Using a hash as a reference is deprecated" warnings in the Server.log and, miraculously, music still comes out of the Touch. I tested the Inguz equalizer (though I don't use that normally) and it works, there are no error messages in the Inguz log and the entries in the Inguz log are the standard ones for DRC and the DRC seems to be working.
    Touch, Meridian G92, Bryston B4 SST2, PMC OB1i speakers, HP Proliant Microserver/Ubuntu, PC/Windows 7, iPad 4, iPeng, Squeezepad.

  3. #3
    Senior Member
    Join Date
    Jul 2009
    Location
    Bristol, UK
    Posts
    473
    I would still appreciate the thoughts of the experts here - just because Inguz appears to work with the amendment doesn't necessarily mean it is working as it should.
    Touch, Meridian G92, Bryston B4 SST2, PMC OB1i speakers, HP Proliant Microserver/Ubuntu, PC/Windows 7, iPad 4, iPeng, Squeezepad.

  4. #4
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    19,746

    hash as a reference is deprecated - InguzEQplugin.pm

    > Should this be re-written as the following, or is it more complicated
    > than that: $h{$ff}


    Without having looked at the code I'd say yes, that should be the
    required change.

    --

    Michael

  5. #5
    Senior Member
    Join Date
    Jul 2009
    Location
    Bristol, UK
    Posts
    473
    Michael,

    Thank you so much for taking a look. It is very much appreciated!
    Touch, Meridian G92, Bryston B4 SST2, PMC OB1i speakers, HP Proliant Microserver/Ubuntu, PC/Windows 7, iPad 4, iPeng, Squeezepad.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •