Thread @INC und @ISA = qw(Exporter); (7 answers)
Opened by Noisebreath at 2006-04-21 17:10

pq
 2006-04-21 17:14
#65195 #65195
User since
2003-08-04
12208 Artikel
Admin1
[Homepage]
user image
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
tina@lugosi:~$ cat document.pm 
package document;
use strict;
use warnings;

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

1;

tina@lugosi:~$ perl -wle'
use document;
my $test = document->new();
print $test'
document=HASH(0x504290)


im übrigen sollte man package-namen (document) großschreiben.
hast du schon perlboot gelesen?\n\n

<!--EDIT|pq|1145625279-->
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. -- Damian Conway in "Perl Best Practices"
lesen: Wiki:Wie frage ich & perlintro Wiki:brian's Leitfaden für jedes Perl-Problem

View full thread @INC und @ISA = qw(Exporter);