Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

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

by ww (Archbishop)
on Feb 05, 2016 at 20:48 UTC ( [id://1154517]=note: print w/replies, xml ) Need Help??


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

A quick check of Tk::Text::SuperText tells us that the module uses the NON-default form of AUTOLOADER. Here's a snippet from the CPAN synopsis of AutoLoader:

package Tk::Text::SuperText; use AutoLoader;

Invoking AutoLoader that way requires that T::Tk::SuperText supply a to replace what you've removed...(or, perhaps, to remove something you didn't delete?), according to the AutoLoader doc:

package Foo; use AutoLoader 'AUTOLOAD'; # import the default AUTOLOAD subrout +ine package Bar; use AutoLoader; # don't import AUTOLOAD, define our o +wn sub AUTOLOAD { ... $AutoLoader::AUTOLOAD = "..."; goto &AutoLoader::AUTOLOAD; } ....

Hence, I suspect your problem lies in your "Simply remove the use AutoLoader statement, remove the __END__ block and move all method inside the module." I'm willing to guess that you already knew that, but can't help suspecting some small (or large) mistake in doing so. Unfortunately, you haven't given us much to go on, in that regard.

++$anecdote ne $data

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:52 UTC
    Unfortunately, you haven't given us much to go on, in that regard.

    True. What do you need to know?

    I really only removed line 76 (use AutoLoader;) and removed lines 650 (1;) and (#__END__).

    My example code looks as follows:

    #!perl use strict; use warnings; use utf8; use 5.020; use FindBin qw/$Bin/; use lib $Bin . '/Tk-Text-SuperText-0.9.5'; use Tk; use Tk::Text::SuperText; say $Tk::Text::SuperText::VERSION; my $mw = tkinit(); my $st = $mw->SuperText->pack(-fill => 'both', -expand => 1); $mw->MainLoop; exit(0);

    Maybe the module was broken from the beginning and the errors show regardless of the changes I did. But that's just a suspicion.

      IMO, your first question is one you must answer for yourself in your search for a solution. I've neither time nor inclination to go hareing back thru the module trying to see what might be involved in "I really only removed line 76 (use AutoLoader;) and removed lines 650 (1;) and (#__END__)."

      As to your "suspicion," it may be well-founded. Consider Corion's reply which looks to be well-worth your attention and followup.


      Spirit of the Monastery

      check Ln42! (or maybe Ln420?)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (6)
As of 2024-04-23 14:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found