[Arsperl-devel] ARSperl ARSOOform.pm, 1.12, 1.13 ARSOOsup.pm, 1.6, 1.7 CHANGES, 1.62, 1.63 changes.
Brought to you by:
jeffmurphy
From: jeff m. <jef...@us...> - 2008-11-24 15:40:31
|
Update of /cvsroot/arsperl/ARSperl In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv30937 Modified Files: ARSOOform.pm ARSOOsup.pm CHANGES changes.dat Log Message: CL enhanced OO interface to handle custom enums so it works with ITSM7 Index: changes.dat =================================================================== RCS file: /cvsroot/arsperl/ARSperl/changes.dat,v retrieving revision 1.60 retrieving revision 1.61 diff -C2 -d -r1.60 -r1.61 *** changes.dat 3 Nov 2008 17:08:19 -0000 1.60 --- changes.dat 24 Nov 2008 15:40:23 -0000 1.61 *************** *** 1,3 **** --- 1,4 ---- released=xx/xx/xxx version=1.92 + !CL enhanced ARS OO interface to handle custom enum fields TS fixed return value of ars_Import TS fixed memory violation in ars_GetListContainer Index: ARSOOsup.pm =================================================================== RCS file: /cvsroot/arsperl/ARSperl/ARSOOsup.pm,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ARSOOsup.pm 15 May 2008 18:30:00 -0000 1.6 --- ARSOOsup.pm 24 Nov 2008 15:40:23 -0000 1.7 *************** *** 122,126 **** return ars_GetListSchema($this->{'ctrl'}, $changedSince, ! $schemaType, $name); } --- 122,126 ---- return ars_GetListSchema($this->{'ctrl'}, $changedSince, ! $schemaType, undef, $name); } Index: CHANGES =================================================================== RCS file: /cvsroot/arsperl/ARSperl/CHANGES,v retrieving revision 1.62 retrieving revision 1.63 diff -C2 -d -r1.62 -r1.63 *** CHANGES 20 Jul 2007 19:44:34 -0000 1.62 --- CHANGES 24 Nov 2008 15:40:23 -0000 1.63 *************** *** 6,10 **** GDF = G. David Frye <gdf at uiuc.edu> JCM = Jeff Murphy <jcmurphy at buffalo.edu> ! JWM = Joel Murphy <jmurphy at acsu.buffalo.edu> Note: items preceeded by a '!' denoted changes that are incompatible with --- 6,12 ---- GDF = G. David Frye <gdf at uiuc.edu> JCM = Jeff Murphy <jcmurphy at buffalo.edu> ! JWM = Joel Murphy <jmurphy at buffalo.edu> ! TS = Thilo Stapff <tstapff at sourceforge.net> [...1687 lines suppressed...] ! (JWM) Internal GetField call now caches results to minimize ! number of queries made. + (JCM) Examples of new functions. ! (JCM) "WhoUsesIt.pl" utility ! ! (rele version=1.0beta ! (JWM) First release + (JCM) Installation, history, and Gnu documentation added. + Removed -lars from makefile (internal C library that wasn't + released), not needed for arsperl. + (JCM) Added example scripts and html documentation. + Index: ARSOOform.pm =================================================================== RCS file: /cvsroot/arsperl/ARSperl/ARSOOform.pm,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** ARSOOform.pm 20 Jul 2007 19:57:56 -0000 1.12 --- ARSOOform.pm 24 Nov 2008 15:40:23 -0000 1.13 *************** *** 64,76 **** if ($fv->{'dataType'} eq "enum") { if (ref($fv->{'limit'}->{'enumLimits'}) eq "ARRAY") { ! $enums{$_} = [@{$fv->{'limit'}->{'enumLimits'}}]; } elsif (exists $fv->{'limit'}->{'enumLimits'}->{'regularList'}) { ! $enums{$_} = [@{$fv->{'limit'}->{'enumLimits'}->{'regularList'}}]; } else { ! print "Sorry. I'm not sure what to do with non-regularLists of enums.\n"; ! print "(this enum is type \"", keys %{$fv->{'limit'}->{'enumLimits'}}, "\")\n"; ! print "listStyle = ", $fv->{'limit'}->{'enumLimits'}->{'listStyle'}, "\n"; ! die; } } --- 64,75 ---- if ($fv->{'dataType'} eq "enum") { if (ref($fv->{'limit'}->{'enumLimits'}) eq "ARRAY") { ! my $i = 0; ! $enums{$_} = { map { $i++, $_ } @{$fv->{'limit'}->{'enumLimits'}} }; } elsif (exists $fv->{'limit'}->{'enumLimits'}->{'regularList'}) { ! my $i = 0; ! $enums{$_} = { map { $i++, $_ } @{$fv->{'limit'}->{'enumLimits'}->{'regularList'}} }; } else { ! $enums{$_} = { map { $_->{itemNumber}, $_->{itemName} } @{$fv->{'limit'}->{'enumLimits'}->{customList}} }; } } *************** *** 380,385 **** "[1] unable to translate enumeration value for field '$f'"); } ! for($i = 0 ; $i <= $#{$this->{'fieldEnumValues'}->{$f}} ; $i++) { ! return $i if $this->{'fieldEnumValues'}->{$f}->[$i] eq $v; } $this->{'connection'}->pushMessage(&ARS::AR_RETURN_ERROR, --- 379,384 ---- "[1] unable to translate enumeration value for field '$f'"); } ! foreach (keys %{$this->{'fieldEnumValues'}->{$f}}) { ! return $_ if $this->{'fieldEnumValues'}->{$f}->{$_} eq $v; } $this->{'connection'}->pushMessage(&ARS::AR_RETURN_ERROR, *************** *** 420,424 **** return undef unless defined $v; if(!defined($this->{'fieldEnumValues'}->{$f}) || ! ($#{$this->{'fieldEnumValues'}->{$f}} < $v) ) { $this->{'connection'}->pushMessage(&ARS::AR_RETURN_ERROR, 81004, --- 419,423 ---- return undef unless defined $v; if(!defined($this->{'fieldEnumValues'}->{$f}) || ! (!exists($this->{'fieldEnumValues'}->{$f}->{$v})) ) { $this->{'connection'}->pushMessage(&ARS::AR_RETURN_ERROR, 81004, *************** *** 427,431 **** } ! return $this->{'fieldEnumValues'}->{$f}->[$v] } --- 426,430 ---- } ! return $this->{'fieldEnumValues'}->{$f}->{$v} } |