Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Re: Perl_call_pv(, , G_ARRAY) returns references as integer type SVt_IV

by dave_the_m (Prior)
on Oct 01, 2012 at 15:00 UTC ( #996673=note: print w/replies, xml ) Need Help??

in reply to Perl_call_pv(, , G_ARRAY) returns references as integer type SVt_IV

SvTYPE() merely tells you the type of the storage container; it doesn't in general say what the logical type of the SV is.

Since 5.12.0, the SVt_RV sv type has been abolished, on the grounds that the SVt_IV container type is perfectly capable of holding a reference.

In general you shouldn't be basing code on tests like SvTYPE(sv) == SVt_RV; instead you should be testing the relevant flags, e.g.:

if (SvROK(sv)) ref = SvRV(sv);


Replies are listed 'Best First'.
Re^2: Perl_call_pv(, , G_ARRAY) returns references as integer type SVt_IV
by rogue_tache (Novice) on Oct 01, 2012 at 16:08 UTC
    Wonderful, that has sorted it. I am much obliged.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://996673]
[Corion]: I think I'm overdesigning things again. I want to export(later, synchronize) data from Google Keep, by scraping the HTML. And I'm thinking of automating this by having a canary note whose text my program knows and from which it can determine the ...
[Corion]: ... surrounding HTML to scrape all the other notes. Maybe I should better look at dumping all the requests that pass between Google and my "browser" instead.
[choroba]: The older one will even perform twice, once at a retirement home, and then at the music school. It's a day off, but will be pretty busy...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2017-12-12 08:55 GMT
Find Nodes?
    Voting Booth?
    What programming language do you hate the most?

    Results (327 votes). Check out past polls.