![]() |
![]() |
9 Einträge, 1 Seite |
1
2
3
4
5
6
7
8
9
10
11
12
13
package MyConstants;
use strict;
use warnings;
require Exporter;
use Readonly qw(Readonly);
our @EXPORT = qw($constant);
our $constant = 5;
1;
1
2
3
4
5
6
7
8
9
#! perl
use strict;
use warnings;
use MyConstants;
# und manchmal ist $constant hier undef - warum?
print "content-type: text/plain\n\n$constant";
our @ISA = qw(Exporter);
use base qw(Exporter);
1
2
3
4
5
6
7
8
9
10
11
12
13
package MyConstants;
use strict;
use warnings;
use base qw(Exporter);
use Readonly qw(Readonly);
our @EXPORT = qw($constant);
Readonly our $constant => 5;
1;
1
2
3
4
5
6
7
8
9
#! perl
use strict;
use warnings;
use MyConstants;
# und manchmal ist $constant hier undef - warum?
print "content-type: text/plain\n\n$constant";
renee+2007-07-31 17:31:23--
QuoteIf any of the listed modules are not loaded yet, *base* silently
attempts to "require" them (and silently continues if the "require"
failed). Whether to "require" a base class module is determined by the
absence of a global variable $VERSION in the base package. If $VERSION
is not detected even after loading it, <base> will define $VERSION in
the base package, setting it to the string "-1, set by base.pm".
![]() |
![]() |
9 Einträge, 1 Seite |