Thread Wann startet ein END Block (30 answers)
Opened by Escape at 2010-01-06 16:02

renee
 2010-01-06 17:59
#130167 #130167
User since
2003-08-04
14371 Artikel
ModeratorIn
[Homepage] [default_avatar]
MyTest.pm
Code (perl): (dl )
1
2
3
4
5
package MyTest;

print $main::test;

1;


Skript.pl
Code (perl): (dl )
1
2
3
4
5
6
7
8
#!/usr/bin/perl

use strict;
use warnings;

our $test = 'hallo';

use MyTest;


vs

Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
11
12
#!/usr/bin/perl

use strict;
use warnings;

our $test

BEGIN {
  $test = 'hallo';
}

use MyTest;
OTRS-Erweiterungen (http://feature-addons.de/)
Frankfurt Perlmongers (http://frankfurt.pm/)
--

Unterlagen OTRS-Workshop 2012: http://otrs.perl-services.de/workshop.html
Perl-Entwicklung: http://perl-services.de/

View full thread Wann startet ein END Block