sub getArtist {
        my ($class, $cb, $artistId) = @_;

$cb is the second parameter and you can verify that this is the first
parameter of the method call *Plugins::Qobuz::API->getArtist(sub {*

I thought that the first parameter always contained a pointer to the
object itself ($self, $class, $client ...) which is automatically
assigned by perl.

No, this depends on how you call a sub:

My::Class->call('abc') -> first parameters is the class, 'abc' second
My::Class::call('abc') -> first parameter is "abc"

--

Michael
_______________________________________________
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/plugins

Reply via email to