in reply to Re^3: Code from perlboot not working as expected
in thread Code from perlboot not working as expected

Dereferencing will get you the value contained in the scalar reference, but the spec expects the package name. The code

print "a $$class goes ", $class->sound, "!\n";

will yield the output

a Mr. Ed goes neigh!

not the expected

a Horse goes neigh!

It will also fail outright if the code is invoked statically, with the error under strict:

Can't use string ("Horse") as a SCALAR ref while "strict refs" in use