package NACL::CS::ComponentState::ZapiArray; # This is an object to put in a path value in the 'map' option to # _zapi_hash_copy. See _zapi_hash_copy in NACL::ComponentUtils. use strict; use warnings; # The string form of a ZapiArray object is the scalar it is a # reference to (the 'name' given to make_zapi_array). use overload ('""' => sub { ${$_[0]} }); BEGIN { use Exporter qw(import); our @EXPORT_OK = qw(make_zapi_array is_zapi_array); } sub new { my ($class,$name) = @_; return bless(\$name,$class); } sub make_zapi_array { my ($name) = @_; return NACL::CS::ComponentState::ZapiArray->new($name); } sub is_zapi_array { my ($obj) = @_; return UNIVERSAL::isa($obj,"NACL::CS::ComponentState::ZapiArray"); } 1;