Are these regular Perl subroutine calls?

methods, oop, perl

Solution

Why don't you just try it?

Spoiler alert:

No, the first parameter will not be the package name.

However, when you do:

My::Package->sub_name( $param1, $param2 )

you will get the package/class name as the first parameter.

Problem

I'm still trying to get a hang of Perl's OOP features. I'm confused about something, if I have a subroutine call like: ``` My::Package::sub_name($param1,$param2) ``` will this get "My::Package" sent as the first parameter? I'd tend to say no, but I'm not sure.

Original source