Skip to Main Content
Perl in a Nutshell, 2nd Edition
book

Perl in a Nutshell, 2nd Edition

by Nathan Patwardhan, Ellen Siever, Stephen Spainhour
June 2002
Beginner content levelBeginner
759 pages
80h 42m
English
O'Reilly Media, Inc.
Content preview from Perl in a Nutshell, 2nd Edition

Name

XS_constant

Synopsis

XS_constant package, types, subname, c_subname
                  

Generates the XS code to implement the Perl subroutine package ::constant used by package ::AUTOLOAD to load constants. This XS code is a wrapper around a C subroutine usually generated by C_constant and usually named constant

types should be given either as a comma-separated list of types that the C subroutine constant will generate or as a reference to a hash. It should be the same list of types that C_constant was given. Otherwise, XS_constant and C_constant may have different ideas about the number of parameters passed to the C function constant.

You can call the Perl visible subroutine something other than “constant” if you give the parameter subname. The C subroutine it calls defaults to the name of the Perl visible subroutine, unless you give the parameter c_subname.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Perl by Example, Fourth Edition

Perl by Example, Fourth Edition

Ellie Quigley
Perl Cookbook, 2nd Edition

Perl Cookbook, 2nd Edition

Tom Christiansen, Nathan Torkington
Perl in a Nutshell

Perl in a Nutshell

Nathan Patwardhan, Ellen Siever, Stephen Spainhour
Learning Perl, 7th Edition

Learning Perl, 7th Edition

Randal L. Schwartz, brian d foy, Tom Phoenix

Publisher Resources

ISBN: 0596002416Errata Page