Re: Perl

[prev] [thread] [next] [lurker] [Date index for 2004/02/25]

From: Juerd
Subject: Re: Perl
Date: 13:14 on 25 Feb 2004
Matt McLeod skribis 2004-02-25 23:44 (+1100):
> I had, in "foo.pm":
> package foo; require Exporter; @ISA = qw(Exporter); @EXPORT = qw(bar
> baz quux); sub bar { ... }; sub baz { ... }; sub quux { ... }; 
> and then in "test.pl":
> use strict; use foo; ...  bar(...); baz(...);
> which resulted in:
> Undefined subroutine &main::baz called at test.pl line 8.

juerd@ouranos:~/tmp/5$ echo 'package foo; require Exporter; @ISA =
qw(Exporter); @EXPORT = qw(bar baz quux); sub bar { 1 } sub baz { 2 }
sub quux { 3 }' > foo.pm
juerd@ouranos:~/tmp/5$ echo 'use strict; use foo; print bar(), baz(),
quux()' > test.pl
juerd@ouranos:~/tmp/5$ perl -l test.pl
123

Either your perl is severely broken, you're not telling the truth or
you're on crack. In any case, I am sure it is not Perl that you hate for
this problem.

> Now, maybe this is all down to some wacko interaction between
> the particular versions of Perl and Digital UNIX involved.  But

That would mean that version of Perl is broken. I'd like to learn the
versions of the platform and perl in question.


Juerd
There's stuff above here

Generated at 14:02 on 01 Jul 2004 by mariachi 0.52