|
The perl ref object is a python object that encapsulates a perl reference. This example shows references to an array and a function: >>> import perl >>> inc = perl.get_ref("@INC") >>> inc <perl ARRAY(0x80db158) ref at 80ecd58> >>> len(inc) 6 >>> add1 = perl.eval("sub { $_[0] + 1 }") >>> add1 <perl CODE(0x812c57c) ref at 80f5dd0> >>> add1(2) 3.0 >>> |
|