Thread END Block innerhalb einer Subroutine (11 answers)
Opened by Kuerbis at 2013-05-09 18:04

bloonix
 2013-05-10 11:24
#167490 #167490
User since
2005-12-17
1615 Artikel
HausmeisterIn
[Homepage]
user image
Hallo Kuerbis,

vielleicht wäre das was für dich:

Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/perl
use strict;
use warnings;

my $x = main->new();

sub new {
my $self = bless { }, shift;

$self->{mouse_mode} = 2;
}

sub DESTROY {
my $self = shift;

if ($self->{mouse_mode} == 2) {
print "foo\n";
}
}


Doku dazu gibt es hier.

Cheers
What is a good module? That's hard to say.
What is good code? That's also hard to say.
One man's Thing of Beauty is another's man's Evil Hack.

View full thread END Block innerhalb einer Subroutine