Thread includes: globale settings include (18 answers)
Opened by Snubnose at 2005-09-09 12:47

renee
 2005-09-09 13:10
#57783 #57783
User since
2003-08-04
14371 Artikel
ModeratorIn
[Homepage] [default_avatar]
Du kannst es in Modulen mit CPAN:Exporter machen...

Modul data.pm:
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package data;

use strict;
use warnings;

require Exporter;

our @ISA = qw(Exporter);

our @EXPORT = ();
our @EXPORT_OK = qw($variable1 $variable2);
our %EXPORT_TAGS = (all => [@EXPORT_OK]);

our $variable1 = 'Test';
our $variable2 = 'Hallo';


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

use strict;
use warnings;
use lib qw(.);
use data qw(:all);

print $variable2," ",$variable1,"\n";
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 includes: globale settings include