in reply to Re: $self->do_it("now") question
in thread $self->do_it("now") question

Yeah, I did! It really doesn't exist. I've even searched the whole system for that text and got no hits apart from the pm file it's called from - very strange

grep "do_it" ./ -ir

Replies are listed 'Best First'.
Re^3: $self->do_it("now") question
by Anonymous Monk on Jul 21, 2015 at 14:22 UTC
    very strange

    Not really; it's fairly normal in a dynamic language like Perl. Like choroba already said, sub names can be autoloaded or dynamically created. Note how in the following two examples, there is no obvious (greppable) place that do_it is defined.

    sub AUTOLOAD { print "Hello!\n" } do_it(); __END__ Hello!
    my $x = "do_"; my $y = "it"; { no strict 'refs'; *{"$x$y"} = sub { print "Hello!\n" }; } do_it(); __END__ Hello!
Re^3: $self->do_it("now") question
by stevieb (Canon) on Jul 21, 2015 at 14:19 UTC

    It very well could be that a module is doing some strange symbol table hackery with the call and transforming it into something that doesn't even remotely resemble the name 'do_it'. Your best bet is the debugger...

Re^3: $self->do_it("now") question
by Laurent_R (Canon) on Jul 21, 2015 at 14:35 UTC
    Besides the possibility, mentioned by other monks, of dynamically created method names and other symbol table hacking or some other form of black magic, I do not think that your grep is sufficient even for straight forward OO modules, because it looks only into the current directory and its sub-directory tree. Perl modules can be installed in other places. You should also look into the directories listed in the @INC array and their subdirectories.