From: Hugo [mailto:hv@crypt.compulink.co.uk] ... > The only thing then that still slightly worries me (after trying a couple > of things) is this: > > crypt% perl -w -Ilib test > Use of uninitialized value in addition (+) at lib/A.pm line 3. > Use of uninitialized value in addition (+) at lib/B.pm line 4. > crypt% > > .. and I don't understand why A::a warns but not C::c. > > Hugo > --- test > #!/usr/bin/perl > use A; > use B; > use C; > > B::all > > --- A.pm > package A; > > sub a { $undef + 0 } > > 1; > --- B.pm > package B; > use warnings; > > sub b { $undef + 0 } > sub all { A::a; B::b; C::c } > > 1; > --- C.pm > package C; > > sub c { $undef + 0 } > > 1; > --- end It's nothing to do with warnings. Put a "use strict 'subs'" in B.pm Bareword "C::c" not allowed while "strict subs" in use at B.pm line 6. Changing C::c to C::c() or rearranging the order the modules get included in test makes it do what you expect. sub all { A::a; B::b; C::c() } PaulThread Previous | Thread Next