[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Omaha.pm] Safely instantiate (or not) a class that may or may notexist?



Kenneth Thompson wrote:
Any chance this approach might work?

  my $obj = ref("${namespace}::${partner_id}::OutboundHeader");
  my $class = $obj || "";
  return 1 if $class
(Completely untested, and off the top of my head...)

I don't think so. AFAIK ref doesn't ever instantiate anything.

perldoc -f ref

j