This is a concern as I am considering an incremental move over to a OO style and higher levels of abstraction. How might OO design or some other abstraction help me support this dual-interface ability?
Easily
{ package UI; ... sub refresh_track_display {} ... } { package UI::Graphical; our @ISA = 'UI'; ... sub refresh_track_display { ... } ... } { package UI::Text; our @ISA = 'UI'; ... # Inherit no-op refresh_track_display. ... } ... $ui->refresh_track_display(); ...
In reply to Re: Eliminating conditional code for GUI and text-mode operation
by ikegami
in thread Eliminating conditional code for GUI and text-mode operation
by gnosti
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |