I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2006-01-30 18:18:56-08 by earl
Getting a foreign class pushed onto the @ISA array

When given a foreign class inheritance, why doesn't this code segment push that class name onto the @ISA array?

foreach my $parent (@packages) { if (exists($TREE_TOP_DOWN{$parent})) { # Inherit from Object::InsideOut class foreach my $ancestor (@{$TREE_TOP_DOWN{$parent}}) { if (! exists($seen{$ancestor})) { push(@tree, $ancestor); $seen{$ancestor} = undef; } } push(@{$class.'::ISA'}, $parent); $need_oio = 0; } else { # Inherit from foreign class # Get inheritance 'classes' hash if (! exists($HERITAGE{$class})) { create_heritage($class); } my $classes = $HERITAGE{$class}[1]; # Add parent to inherited classes $classes->{$parent} = undef; } }

I have an inside out class IOC that ISA PVC class. PVC in a pure virtual class and therefore a foreign class. Within the IOC package, I have the ...

use Object::InsideOut qw/PVC/;

When I use IOC and print out it's @ISA array, PVC is not there. I looked at the Object::InsideOut code that mutates @ISA. I thought it should push inherited foreign class onto @ISA. What should I do to get PVC onto the @ISA array?

Earl
Direct Responses: 1723 | Write a response