Content Assist on returned variables

mattlg wrote on Tue Jul 29 20:40:43 MEST 2008:
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.

jploski wrote on Tue Jul 29 20:53:57 MEST 2008:
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.
mattlg wrote on Tue Jul 29 21:53:56 MEST 2008:
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.
jploski wrote on Tue Jul 29 22:01:40 MEST 2008:
Content assist in EPIC is nothing but a bunch of regular expressions.
mattlg wrote on Thu Jul 31 18:39:26 MEST 2008:
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 :-)

Note: The above is an archived snapshot of a forum thread. Use the original thread at to post comments.