in reply to Re: problem referencing global variable in self-written module
in thread problem referencing global variable in self-written module

Well, crashtest, I couldn't leave well enough alone. Since I also need to test the exchange of scalar variable values between a script and a module, I started with changing the variable name "$fleece" to "$color", and added a variable to the testuse script ($ANIMAL) to be used by the Fleece module in creating a new variable. A weird thing happened when I tried to test the use of $ANIMAL, and the renamed variable "$color". I got these messages:
Name "Fleece::color" used only once: possible typo at testuse.pl line 13.
Use of uninitialized value in concatenation (.) or string at testuse.pl line 13.

Here's the code from the script:
#!perl; use warnings; use strict; use Fleece qw( $fleece ); my $BNAME = 'Mary'; my $ANIMAL = 'lamb'; print "$BNAME had a little $ANIMAL, little $ANIMAL, little $ANIMAL,\n" +; print "$BNAME had a little $ANIMAL,\n"; print "Its fleece was $Fleece::color\n";
Here's the code from Fleece.pm:
package Fleece; use strict; use warnings; our $color = "white as snow.\n"; 1;
Do you have any idea what my coding error may be?