in reply to Hiding methods of class

Store a reference to an anonymous subroutine in a my variable:
my $sref = sub { print "This has no name\n" }; &$sref(); # Call the subroutine
Being a my variable, the reference is not visible outside the class.