Oliver Block wrote:
hello everybody,

Hello,

what may cause perl to give the following command line output Global symbol "$form" requires explicit package name at /.../Address.pm line 44.


even if the variable $form is declared in line 16 as follows

        my $form = $self->formbuilder;

within a sub of a class definition.

Lexical variables (declared with my) are only visible from the point of declaration forward within the current block/file so if you try to use that variable before it is declared or outside the block/file in which it is declared you will get that message.

http://perl.plover.com/FAQs/Namespaces.html



John
--
Perl isn't a toolbox, but a small machine shop where you
can special-order certain sorts of tools at low cost and
in short order.                            -- Larry Wall

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to