Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Porting a C/C++ Structure to Perl

by tobyink (Abbot)
on Jan 17, 2013 at 20:18 UTC ( #1013879=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use MooX::Struct
       Point   => [ 'x', 'y' ],
    ...
    ;
    
    my $origin = Point3D[ 0, 0, 0 ];
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1013879]
help
Chatterbox?
[Discipulus]: ovedpo15 A subroutine may be called using an explicit & prefix. The & is optional in modern Perl... see perlsub in docs and search for ampersand
[Discipulus]: it has some, even dangerous, implication
[Discipulus]: I still use but I also attract many critics for this: I use when I call subs defined in the very same file, just to recognize them. You can avoid (but sometimes is needed)

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (13)
As of 2018-05-22 12:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?