in reply to Determining the true type of a reference

I figured out why the B::XXXX::METHODS were causing page faults. It was a case of user error. <sheepish grin>

One must pass an object from the appropriate class to them or that will happen. For example, to use B::PVLV::TYPE you have to pass an object of the B::PVLV class to it.

use B; my $lvalue = \substr("abc",1,1); my $lvobject = B::svref_2object($lvalue); print B::PVLV::TYPE($lvobject);

Had I read the item about B::svref_2object I would have known this.

Replies are listed 'Best First'.
Re: Core Dump using B::XXXX::METHODS resolved
by diotalevi (Canon) on May 28, 2003 at 01:21 UTC

    No, you just called the method incorrectly. $lvobject->TYPE should work regardless of what sort of thing was handed to B::??::TYPE. So what made you think you should call a method like a function? Normally you call a method like a method and then any inheritance (what B:: uses) or any class AUTOLOAD can handle the issue. So what gives?

    I was off at a great party over the weekend and didn't see your post until just now. :-)

      Do I have egg on my face?
      Looks like I should reread the whole set of B docs.