Class: Perl::Value::Hash
Constant Summary collapse
- HV_DISABLE_UVAR_XKEY =
0x01
- HV_FETCH_ISSTORE =
0x04
- HV_FETCH_ISEXISTS =
0x08
- HV_FETCH_LVALUE =
0x10
- HV_FETCH_JUST_SV =
0x20
- HV_DELETE =
0x40
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(args = nil) ⇒ Hash
constructor
A new instance of Hash.
- #to_perl ⇒ Object
Constructor Details
#initialize(args = nil) ⇒ Hash
Returns a new instance of Hash.
56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/perl/value/hash.rb', line 56 def initialize(args = nil) @perl = Perl.PL_curinterp @hash = nil @hv = nil case args when Hash @hash = args when nil else raise "Don't know how to handle #{args.class} (#{args.inspect})" end end |
Class Method Details
Instance Method Details
#to_perl ⇒ Object
70 71 72 |
# File 'lib/perl/value/hash.rb', line 70 def to_perl @hv ||= self.class.send(:build_hv, @perl, @hash) end |