__PACKAGE__ is only special when used as a constant; putting it in a string (or a regex) makes it not a constant. While you could do
... =~ quotemeta(__PACKAGE__), this is not the issue. If you want to see if the first argument to your function is an object, I would suggest:
sub something {
if (eval { $_[0]->isa(__PACKAGE__) }) {
# object call
}
else {
# function call
}
}