Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^2: Using $a and $b from XS

by dakkar (Hermit)
on Feb 07, 2005 at 20:50 UTC ( #428813=note: print w/ replies, xml ) Need Help??


in reply to Re: Using $a and $b from XS
in thread Using $a and $b from XS

Just nit-picking, but... it's not (necessarily) main::a and main::b. They have to be in the package of the comparison sub.

-- 
        dakkar - Mobilis in mobile

Most of my code is tested...

Perl is strongly typed, it just has very few types (Dan)


Comment on Re^2: Using $a and $b from XS
Replies are listed 'Best First'.
Re^3: Using $a and $b from XS
by BrowserUk (Pope) on Feb 08, 2005 at 02:41 UTC

    Any pointers as to how to discover the caller's package from XS/Inline::C?

    Update: Never mind. Just dropping the 'main::' part seems to work fine--so long as they don't embed a package statement into the comparator sub.


    Examine what is said, not who speaks.
    Silence betokens consent.
    Love the truth but pardon error.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2015-07-28 06:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (252 votes), past polls