In this particular case, it could be implemented, but it doesn't generalize easily at all. You could break it by modifying your source slightly. It is generally a cost/benefit question whether and when hacks that support a bunch of particular cases should be implemented.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm a bit confused as to how the content assist works in OO-Perl, becuase I've just noticed that you don't have to bless the object reference for the content assist to realise that it's an object being returned from new(). I'd assumed it would know that a blessed reference was an object and allow content assist on it's subroutines.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've just tested this in Komodo (at work) and it seems that Komodo can't handle it either. I'm glad I didn't fork out for it when EPIC is clearly just as good :-)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am finding that content assist works fine on $object1 when I do:
my $object1 = Class1->new();
but when I then do
my $object2 = $object1->createClass2();
I get no content assist on $object2, even if createClass2() is just
sub createClass2 {
return Class2->new();
}
Surely content assist can work out what subroutines are availabe to $object2 from that.
MattLG
In this particular case, it could be implemented, but it doesn't generalize easily at all. You could break it by modifying your source slightly. It is generally a cost/benefit question whether and when hacks that support a bunch of particular cases should be implemented.
I'm a bit confused as to how the content assist works in OO-Perl, becuase I've just noticed that you don't have to bless the object reference for the content assist to realise that it's an object being returned from new(). I'd assumed it would know that a blessed reference was an object and allow content assist on it's subroutines.
Content assist in EPIC is nothing but a bunch of regular expressions.
I've just tested this in Komodo (at work) and it seems that Komodo can't handle it either. I'm glad I didn't fork out for it when EPIC is clearly just as good :-)