Announcing Tie::Wx::Widget

its a small idea and a module. in fact I wrote the core code in a minute on a slide of my talk I held 2 weeks ago in Berlin. Now it becomes "real" :). from the "doc":

use Tie::Wx::Widget;

tie $tiedwidget, Tie::Wx::Widget, $widgetref;

# instead of say $widgetref->GetValue;
say $tiedwidget;

# instead of $widgetref->SetValue('7');
$tiedwidget = 7;

untie $tiedwidget;

Its just the simple idea to reduce visible syntax, but will become more usefull in combination with the next planned module that takes you XRC-produced widgettree and gives you a similar tied hash, so you have not only a simple API for your basic IO but also all locked in the namesmace of a hash variable which you can much easier pass around when creating event driven subroutines. if the widgets dont have name attributs i will have to be more tricky.

Please post your thoughts on that. I plane some even bigger surprises.

Leave a comment

About lichtkind

user-pic Kephra, Articles, Books, Perl, Programming