opensourcer has asked for the wisdom of the Perl Monks concerning the following question:

hi monks i never come though these things, can any 1 help me with these things.
@PK::NWKK::AA= @_; # what is @PK::NWKK::AA Nr::CE::->setAWArgs(\@PK::NWKK::AA); # what is Nr::CE::->setAWArgs
"I really don't live on earth, it's just my reflection" "open source is not only technology, but it's a world out there - opensourcer"

Replies are listed 'Best First'.
Re: what are these
by Hena (Friar) on Jul 04, 2005 at 07:03 UTC
    First one is an array '@AA' in module 'PK::NWKK'. I think.

    Second. Well i would suggest lookin in the module Nr::CE and checking for subroutine setAWArgs (which is taking in an array reference). It looks like a object handling, but I haven't used objects so I'm quite unsure (it looks funny as there is nothing between '::' and '->').
Re: what are these
by ambrus (Abbot) on Jul 04, 2005 at 08:06 UTC

    I am not sure, but I think that Nr::CE::->setAWArgs(\@PK::NWKK::AA); here is equivalent to Nr::CE->setAWArgs(\@PK::NWKK::AA);. This is because an identifier followed by a double colon followed by nothing is usually equivalent to just the identifier as a bareword (without the double colon) except that it works under strict but warns if a package with the same name doesn't exist.

Re: what are these
by ysth (Canon) on Jul 04, 2005 at 09:16 UTC
    Nr::CE::->setAWArgs is a call to the class Nr::CE method setAWArgs. So is "Nr::CE"->setAWArgs.

    Just plain Nr::CE->setAWArgs is also, except when there exists a Nr::CE function at compilation time. In that case, it is actually Nr::CE()->setAWArgs (calling the setAWArgs method on the function's return value). This is why I prefer one of the first two forms to call a class method.

Re: what are these
by jhourcle (Prior) on Jul 04, 2005 at 15:11 UTC

    I'll take a general stab at it --

    1. It's a poorly written block of code, by someone who hasn't selected adequately named package, variable, or subroutines.
    2. It's a block of code that was written by a poor typist, who insists on typing as little as possible.
    3. It's a block of code that was written as a one-off, that the author intended to never need to be maintained, or understood 5 minutes after it was written.

    Of course, #2 and #3 are really just subsets of #1.