Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

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

by Anonymous Monk
on Feb 06, 2016 at 00:07 UTC ( [id://1154532]=note: print w/replies, xml ) Need Help??


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

But then it happens: suddently, stuff that worked before does not work anymore. To be precise: With the current state of the module (v0.9.5), typing a < works fine. With the new state, with the adjustments as described above, it crashes immediately.

What is the error message?

It "works" for me on win32, with or without use autoloader/__END__, typing < or >, no crash

Replies are listed 'Best First'.
Re^2: Need help to remove AutoLoader in Tx::Text::SuperText
by capfan (Sexton) on Feb 08, 2016 at 13:48 UTC

    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; }

      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://1154532]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2024-03-29 05:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found