- Perl ›
- builtin functions ›
- here
__PACKAGE__ - Get package name
You can get package name by specifying __PACKAGE__ .
__PACKAGE__
Example program
This is an example to get the package name.
package SomePackage; use strict; use warnings; # Get package name my $package_name = __PACKAGE__;