FVWM: Perl-fvwm module

From: Riswick, J.G.A. van <J.G.A.v.Riswick_at_tue.nl>
Date: Fri, 24 May 2002 22:14:09 +0200

HI

On the internet I stumbeled upon an example perl program,
implementing an fvwm module. This seems to be what I am
looking for. The example worked fine on my system.

Now, I'd like to use 'SendToModule' to send strings to my
module, so I tried to configure the perl program to read strings
as shown in the example below. When the module in the example
is started, it should send the configuration command
'style * notitle' to fvwm, when the program receives a
string sent by fvwm through the command

SendToModule FvwmTest astring

However, when I try this, nothing happens. What am I doing
wrong?

Also I'd like to know, if there is some way to let the
module display a string somewhere, for debugging purpouses.

best regards,

jos





---------------------------------
#!/usr/bin/perl -w

use strict;
use lib `fvwm-config -p | tr -d '\n'`;
use FVWM::Module;

my $stringHandler= sub {
        my $self = shift;
        my $type = shift;
        my _at_args = @_;

        $self->sendText("style * notitle");
};

my $module = new FVWM::Module(
        Name => "FvwmTest",
        Mask => M_STRING,
);

$module->addHandler(M_STRING, $stringHandler);
$module->eventLoop();


--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_fvwm.org.
To report problems, send mail to fvwm-owner_at_fvwm.org.
Received on Fri May 24 2002 - 15:14:43 BST

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:37:53 BST