Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^2: Need help to remove AutoLoader in Tx::Text::SuperText

by capfan (Sexton)
on Feb 08, 2016 at 13:48 UTC ( [id://1154628]=note: print w/replies, xml ) Need Help??


in reply to Re: Need help to remove AutoLoader in Tx::Text::SuperText
in thread Need help to remove AutoLoader in Tx::Text::SuperText

Ah, it seems that the issue when typing a bracket is related to the debugger. I'm working with Komodo IDE.

I do not get a Perl error message, it just crashes and then shows a generic Windows error notification (Perl Command Line Interpreter stopped working).

Without the debugger, I do get the same result when pressing tab and then shift + tab.

I can't reproduce it at the moment, but I once also saw a debugger warning about deep recursion for focusPrev.
The method looks as follows:

sub focusPrev { my $w = shift; $w->focusPrev; }

Replies are listed 'Best First'.
Re^3: Need help to remove AutoLoader in Tx::Text::SuperText
by Corion (Patriarch) on Feb 08, 2016 at 13:54 UTC

    I would suspect that something is different in the way the parameters get passed to focusPrev between the "with AutoLoader" and the "no AutoLoader" version. If $w contains $self (as would be customary), then $self->focusPrev will call itself forever (or until the memory is exhausted).

    Maybe output a dump of @_ on each call to focusPrev to see the difference between the AutoLoader version and the other one.

    Of course, this assumes that the widget isn't broken and the problem does not happen with the unmodified widget either :).

    Update: Thinking more about it, I wonder how this could work with the AutoLoader version at all. Removing the two subroutines should still keep focus switching working in both versions of the module.

      I tried to identify a difference in the with and without Autoloader method, but I did not find any.

      So I removed the 2 methods.

      Now, shift + tab does not decrease indent anymore. But the rest works (I guess). I also put up a GitHub repo.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1154628]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2024-03-19 11:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found