[Kde-perl] Signals & Slots

Germain Garand germain at ebooksfrance.org
Fri Jun 6 00:55:30 CEST 2003


Le Jeudi 05 Juin 2003 23:19, Germain Garand a écrit :
> I implemented
>    sub foo : signal( int )
> rather than
>    sub foo : signal( foo( int ) )

BTW, the old/alternative syntax is still perfectly valid of course.

Eventually, one could even use both redundantly to make the declaration 
perfectly clear:

e.g:

package Mine;
use Qt;
use Qt::isa qw( Qt::PushButton );
use Qt::slots
        'foo'   => [];

[ ... 10 kilo lines ... ]

sub foo : slot()
{
   ...
}

this would need some extra code to check for conflicting declarations and if 
so, decide something ( probably to die )

Otherwise, I was wondering wether the uppercase form 
  
  sub foo : SLOT( int )

wouldn't be even clearer, has it answers in an obvious way to the connect() 
syntax?
Noisy though.


Germain




More information about the Kde-perl mailing list