Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re: "my" variable $self

by davorg (Chancellor)
on Nov 09, 2006 at 13:28 UTC ( #583097=note: print w/replies, xml ) Need Help??

in reply to "my" variable $self

There seems to be some scoping confusion going on here. Please post a short (<30 lines) program that demonstrates this problem.


"The first rule of Perl club is you do not talk about Perl club."
-- Chip Salzenberg

Replies are listed 'Best First'.
Re^2: "my" variable $self
by Anonymous Monk on Nov 09, 2006 at 13:53 UTC
    I appreciate any insight you may have. This is related to an earlier post regarding my sub error. Here is a simple script that re-creates the error using PerlApp:
    use strict; use warnings; use WWW::Myspace; use Contextual::Return::Failure; my ($account, $password) = retrieve_acct_info(); my $myspace = WWW::Myspace->new($account,$password); sub retrieve_acct_info { my $account = 'email'; my $password = 'password'; return ($account, $password); }
    The error is:
    "my" variable $self masks earlier declaration in same scope at + line 11, <DATA> line 21937.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2023-09-27 21:39 GMT
Find Nodes?
    Voting Booth?

    No recent polls found