in reply to How to override the standard module
In one program, as a proof of concept, monkeypatch
use Tk; use Tk::DialogBox; use Tk::Wm; ## overrides sub Tk::Wm::Pancake { ... } sub Tk::DialogBox::Syrup { ... }
If it works, and you want to share with other programs, subclass, see Tk::mega and ?node_id=3989;BIT=Construct%20Tk%3A%3AWidget;HIT=tk
package Tk::JoyDialogBox; use Tk::widgets qw/ DialogBox /; use base qw/ Tk::DialogBox /; Construct Tk::Widget 'JoyDialogBox'; sub Pancake { ... } sub Syrup { ... }
|
|---|