In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Randal L. Schwartz) writes: >>>>>> "Drieux" == Drieux <[EMAIL PROTECTED]> writes: > >Drieux> if ( ref($got_back) eq "Foo::Bar") > >No no no. Stop using ref(). It means you can't replace it >with a subclass of it. > >You want (and I show in my still-hidden article); > > if (UNIVERSAL::isa($got_back, "Foo::Bar")) { ... }
If $got_back might not be a reference, there is a (very unlikely) problem if it happens to be a class name instead. See http://groups.google.com/groups?selm=200406061505.17786.peter%40adpm.de But in this case, if you're already sure it's an object, there's no problem. -- Peter Scott http://www.perldebugged.com/ *** NEW *** http://www.perlmedic.com/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>