develooper Front page | perl.perl5.porters | Postings from January 2012

Re: knowing variable name using SV pointer

Thread Previous | Thread Next
From:
David Golden
Date:
January 1, 2012 14:29
Subject:
Re: knowing variable name using SV pointer
Message ID:
CAOeq1c_sfYtLwRbTn0Zqw4=SoGe89Be_qtaohJNd8FLW1fnpYg@mail.gmail.com
Look at Padwalker on CPAN, maybe?

David
On Jan 1, 2012 2:12 AM, "Kamal Khatri" <kchetry2@gmail.com> wrote:

> On Sat, Dec 31, 2011 at 6:06 PM, Leon Timmermans <fawaka@gmail.com> wrote:
> > On Sun, Jan 1, 2012 at 12:51 AM, Kamal Khatri <kchetry2@gmail.com>
> wrote:
> >> Perlguts mentions that we can get SV pointer to a variable
> >> by using its name as follows:
> >>
> >> SV* perl_get_sv("myvar", FALSE);
> >>
> >> Is there a way to get back the variable name using the SV pointer.
> >> In this case it would mean getting the name "myvar" using the
> >> SV pointer.
> >>
> >> Any pointers would be highly helpful.
> >
> > An SV can has any(zero or more) names, your question doesn't make much
> > sense in that light.
>
> Maybe I should have phrased my question differently. Would it be
> possible to get the variable names of the SV if the variable name
> existed. It would
> be alright if the SV pointer variable had more than one names.
>
> thanks,
> Kamal
>

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About