Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Code is giving "explicit package name required" error

by SuicideJunkie (Priest)
on Mar 22, 2013 at 21:48 UTC ( #1024984=note: print w/ replies, xml ) Need Help??


in reply to Code is giving "explicit package name required" error

Global symbol "$cmd" requires explicit package name at D:\Interwoven\TeamSite\custom\tsadm\testFile3.pl line 32.

That means you have a variable "$cmd" on line 32, which you failed to declare with my $cmd or a similar statement.

You've already got a bunch of variables declared at the beginning, so you just forgot to declare this one.

EDIT:

Please don't remove your existing text. Append to it with an edit mark, or if the problem is sufficiently different, it may be appropriate to start a new SoPW.

***ERROR - Starting deployment. Reason from server: DEPLOY_CONFIG_FILE Details : Deployment config file not found (D:\Interwoven\OpenDeploy NG\conf\D:\Interwoven\OpenDeployNG\conf\tsadm\test_jignesh.xml)

This has nothing to do with perl. It looks like your config file name got mangled as it has two drive letters in it.


Comment on Re: Code is giving "explicit package name required" error
Select or Download Code
Re^2: Code is giving "explicit package name required" error
by LanX (Canon) on Mar 23, 2013 at 14:21 UTC
    > > Global symbol "$cmd" requires explicit package name at ...

    > That means you have a variable "$cmd" on line 32, which you failed to declare with my $cmd or a similar statement.

    I wonder if nowadays the error message shouldn't be updated to something "requires explicit package name or lexical "my" declaration ..."

    Lexicals replaced package vars as a standard long ago, maybe the feedback should reflect the most probable cause.

    I'm aware that changing the message might confuse some parsers, but it's such a common question here that it's worth a rethink.

    Cheers Rolf

    ( addicted to the Perl Programming Language)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1024984]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (14)
As of 2014-09-18 16:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (119 votes), past polls