Hi Everyone,

I maintain a perl module on CPAN called Remedy:::ARSTools.
It's pretty much a dumbed down version of ARSperl, but it has a few niceties. I 
find it useful anyhow.

One of it's main useful features is that it sits on top of ARSperl and munges 
your function calls based on the version of ARSPerl that's installed (so you 
get a little bit of portability for your scripts).

In any case, please pardon my ignorance on this ... I don't deal with the API 
nearly as often as I used to. I haven't had to use it in years.
I have a project where I need to use it again, so I pulled the module out and 
installed it.

I'm running 1.91 compiled against the 7.1 API (32-bit perl on 64-bit linux 
yadda yadda) connecting to a 7.6.3 server.

Amazingly everything seems to work except that the output of ars_GetField seems 
to have changed.
Back when I wrote the module, you'd get something like:

        $meta = ARS::ars_GetField( $ctrl, $schema, $field);

        if (ref($meta) eq "HASH"){
                $maxFieldLength = $meta->{'maxLength'};  #that is, if its a 
string the maximum length thereof
        }elsif ((ref($meta) eq "ARRAY") && ($meta->{'dataType'} eq "enum")){
                @array_of_enum_values = @{$meta->{'limit'}}; #an array 
containing the enum values in order
        }

'dataType' is still there, so that's good, but the enum values seem to have 
moved to:

        $meta->{'limit'}->{'enumLimits'}->{'regularList'}

the maximum field length seems to have moved to:

        $meta->{'limit'}->{'maxLength'}

So, anyhow, I'm not sure if this is a function of the ARS version I'm 
connecting to, or if it's a function of the version of API/ARSperl I'm using.
I've looked through the change log and I don't see any obvious mention of 
ars_GetField other than a note that a bug correcting return undef behavior was 
fixed in 1.91

Can anyone on the list confirm if this is a function of the ARSperl version, 
and if it is, let me know the version where it changed?
I'd like to abstract it in my module so I can look for the data in the 
appropriate place depending on the version number.

Thanks everyone!

-Andrew
------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1

--
Arsperl-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/arsperl-users

Reply via email to