in reply to Re: COPE and 'any' data type
in thread COPE and 'any' data type

You have said to use: $CORBA::MyModule::MyData::_tc

When I use this it doesn't recognise the data type in the Any constructor. It therefore sets the value and type to be null.

In the examples in the COPE/t/base2.t they use $MyModule::MyData::_tc. This at least seems to run the correct code in the constructor but I then get an error when I run it saying:

Can't use string ("NONE") as an ARRAY ref while "strict refs" in use at Perl/perllib/COPE/CORBA/Any.pm line 63.

I know this is to do with symbolic and hard references but I'm not sure what I have to do. This error occurs in the _marshal_any method of Any. I can't seem to see in the example what has been done to allow $MyModule to be used.

Was there a reason why you used $CORBA and then the package so that it is different to the example?

Thanks for any help. This seemingly simple problem is driving me mad.

Replies are listed 'Best First'.
Re: Re: Re: COPE and 'any' data type
by Anonymous Monk on Jul 04, 2002 at 02:51 UTC

    Ok figured it out. One of the members of MyData was also an Any. This was not being set correctly.

    So the solution was

    my $anyData = new CORBA::Any($MyModule::MyData::_tc, $struct).

    Thanks fever. You got me on the right track.