Incorrect search filter: invalid characters - *.p[ml]
ARSperl

 view release on metacpan or  search on metacpan

Artistic  view on Meta::CPAN

fall under the restrictions of Paragraphs 3 and 4, provided that you do
not represent such an executable image as a Standard Version of this
Package.

7. C subroutines (or comparably compiled subroutines in other
languages) supplied by you and linked into this Package in order to
emulate subroutines and variables of the language defined by this
Package shall not be considered part of this Package, but are the
equivalent of input as in Paragraph 6, provided these subroutines do
not change the language in any way that would cause it to fail the
regression tests for the language.

8. Aggregation of this Package with a commercial distribution is always
permitted provided that the use of this Package is embedded; that is,
when no overt attempt is made to make this Package's interfaces visible
to the end user of the commercial distribution.  Such use shall not be
construed as a distribution of this Package.

9. The name of the Copyright Holder may not be used to endorse or promote
products derived from this software without specific prior written permission.

CHANGES  view on Meta::CPAN


 (TS)   updated version numbers in INSTALLATION

 (TS)   added ars_DateToJulianDate, ars_GetListLicense, ars_ValidateMultipleLicenses,
        ars_GetServerCharSet, ars_GetClientCharSet

 (TS)   fixed actionList/elseList bug in ars_SetActiveLink

 (TS)   added AR_DATA_TYPE_VIEW handling to perl_ARValueStruct_Assign,rev_ARActiveLinkActionList

 (TS)   modified Makefile.PL for easier automated testing (handling of ARSPERLTEST_PARAM)

 (TS)   added ars_GetListRole, ars_Signal, ars_GetTextForErrorMessage

 (TS) ! changed return struct of ars_GetListGroup

 (TS)   fixed IVLD macro in support-h.template


Released: 05/06/2008 Version: 1.91

CHANGES  view on Meta::CPAN


 (TS)   changed handling of keyword values in rev_ARValueStruct
        (assume "keyword" if first character == '\0' and length > 0)  

(JCM)   minor update to example scripts Dump_User*.pl


Released: 09/20/2005 Version: 1.85


 (TS)   added binmode-statements in t/10entry.t (test failed on win32)

 (TS)   warning cleanup in test files (t/02export.t, t/13join.t)

 (TS)   added ars_SetLogging (changes to ARS.xs, ARS.pm, support.c, support-h.template,
        html/manual/toc.html;  new files: html/manual/ars_SetLogging.html, t/21setlogging.t)

 (TS)   fixed pointer dereferencing error in supportrev.c:strmakHval

 (TS)   fixed supportrev.c:strcasecmp, strncasecmp; failure to differentiate between 
        string and substring (e.g. "page_holder" and "page")

 (TS)   fixed support.c:perl_ARByteList (Bug ID 1213180)

CHANGES  view on Meta::CPAN

(JCM)   memory leak fixed in ControlStruct destructor

(JCM)   various other memory related cleanups

(JCM)   bad/NULL ref fixed in ExpandCharMenu

(JCM)   added new params to ars_Login: lang, authString, tcpport, rpcnumber

(JCM)   added new rv's to ars_GetControlStructFields: lang, authString

(JCM)   updated example and test scripts 

(JCM)   added Alert functions (replaces NT/Notifier functions)

(JCM) ! 5.x (5.0.1, 5.1, 5.1.1) integration 
        functions that no longer are available or always
        return errors indicating they are no longer implemented:
   		
   		ars_NT*()   [notifier functions]
        
        functions whose parameters have changed:

CHANGES  view on Meta::CPAN

(JCM)   added better support for decoding filters/activelinks
        for arsystem 4.0 (not finished yet)

(JCM)   added support for data type "decimal" when performing
        (Set|Create)Entry


Released: 04/7/99 Version: 1.6403 BETA


(JCM)   tested/fixed compiling against pre-4.0 apis. 

(JCM)   OO: now checks named params to ensure you don't
        mis-spell them.

(JCM)   attachment allows specify a 'name' hash key so you can
        customize the name that appears in the attachment field
        in the usertool.  (Nick Stoughton {NickS at ISRWORLD.com})

(JCM)   OO: form->setSort method added

CHANGES  view on Meta::CPAN

(JCM)   added ars_GetEntryBLOB (attachment field handling) 
        thanks to  "Kaelin Colclasure" {kaelin at talarian.com}
        for supplying part of the code for the BLOB functions.

(JCM)   simplified Makefile.PL configuration steps

(JCM)   added attachment example scripts

(JCM)   added basic OO layer

(JCM)   added small test suite

(JCM)   fixed some broken 4.0 related conditional compilation
        stuff

(JCM)   makefile now automatically converts C header files into
        perl files so that all constants (C 'defines') are
        available.


Released: 01/04/99 Version: 1.63

INSTALLATION  view on Meta::CPAN

      my $ar_lib_dir = join('/', $path_to_api_dir, 'lib');

      change to:

      my $ar_lib_dir = join('/', $path_to_api_dir, 'lib64');
    
6) cd to ARSPerl directory and run perl Makefile.PL

7) dmake

8) If desired (and able!), run dmake test

9) dmake install

10) Prior to using the compiled ARSPerl, update %PATH% first.

   %PATH% update notes:
   -    32-bit: Add the bin and lib directories from where the ARS API files 
        were unpacked
   -    64-bit: Add the lib64 directory from where the ARS API files were 
        unpacked

MANIFEST  view on Meta::CPAN

html/changes.html
html/debug.html
html/DumpSetup.html
Makefile
t/33setcontainer.t
t/40createcharmenu.t
t/01import.t
t/20merge.t
t/31createschema.t
t/35setactlink.t
t/aptest.def
t/10getescalation.t
t/21setlogging.t
t/34createactlink.t
t/00connect.t
t/aptest45.def
t/02export.t
t/38createescalation.t
t/32createcontainer.t
t/aptest51.def
t/41setcharmenu.t
t/09qualifier.t
t/37setfilter.t
t/10getftinfo.t
t/36createfilter.t
t/39setescalation.t
t/10alink.t
t/11entry.t
t/aptest40.def
t/10getlist.t
t/aptest50.def
t/12lotsoffields.t
t/10entry.t
t/config.cache
t/13join.t
TODO
supportrev.c
supportrev_generated.h
ARS.xs
CHANGES
support-h.template

Makefile.PL  view on Meta::CPAN

	sleep 5;
}

if ($LARCH =~ /64/) {
	if ($Config{'cc'} =~ /cc/) {
		$REDUCE_SYMBOL_SCOPE = 1;
	}
	else {
		print "\n\nWARNING: Because of symbol name collisions (both -- perl and arapi -- use the xdr-functions),\n" .
		      "         it is necessary to reduce the symbol scope to symbols declared within the DSO.\n" .
		      "         ARSPerl wasn't tested on '$Config{'cc'}', if you run into trouble during 'make test'\n" .
		      "         please contact the developer/maintainer!\n\n";
	}
}

push(@extras, CAPI => 'TRUE') if ($] >= 5.005       &&
                                  $^O eq 'MSWin32'  && 
				  (($Config{archname} =~ /-object\b/i) ||
                                   ($Config{archname} =~ /-multi-thread\b/i))
                                 );
push(@extras, LDDLFLAGS => " -Wl,--exclude-symbols,\177arapi71_NULL_THUNK_DATA ") if $^O eq 'cygwin';

Makefile.PL  view on Meta::CPAN


              'realclean' => {
		 'FILES' => 'support.h ARS/ar-h.pm ARS/arerrno-h.pm ARS/_h2ph_pre.ph  t/config.cache serverTypeInfoHints.h *~ .purify ' 
	      } 
);

makeTestConfig();

print "
Type 'make' (windows: 'nmake') to build ARSperl.
Type 'make test' to test ARSperl before installing.
Type 'make install' to install ARSperl.

";

exit 0;

# ROUTINE
#   GenerateSupportDotH(template-file, includes-dir)
#
# DESCRIPTION

Makefile.PL  view on Meta::CPAN

	my ($S, $U, $P, $T) = ("", "", "", 0);

	if(-e "./t/config.cache") {
		do './t/config.cache';
		$S = &CCACHE::SERVER;
		$U = &CCACHE::USERNAME;
		$P = &CCACHE::PASSWORD;
		$T = &CCACHE::TCPPORT;
	}

	print "=== ARSperl 'make test' configuration. ===

Please enter the following information. This information will be
recorded in ./t/config.cache

If you want to skip the 'make test' step, just hit ENTER
three times. You can configure it later by either re-running
'perl Makefile.PL' or by editting ./t/config.cache

Fair warning: you probably don't want to run 'make test' against a 
production ARSystem server. 

";
	
	( $SERVER, $USERNAME, $PASSWORD ) = ( '', '', '' );	
	print "Server Name [$S]: ";
	chomp($SERVER = $ARSPERLTEST_SERVER || <STDIN>);
	if($SERVER eq "") {
		$SERVER = $S if ($S ne "");
	} 

Makefile.PL  view on Meta::CPAN

sub ARS_VERSION_63  { 11; }
sub ARS_VERSION_70  { 12; }
sub ARS_VERSION_71  { 13; }
sub ARS_VERSION_75  { 14; }
sub ARS_VERSION_760 { 15; }
sub ARS_VERSION_762 { 16; }
sub ARS_VERSION_763 { 17; }
sub ARS_VERSION_764 { 18; }
sub ARS_VERSION_80  { 19; }
sub ARS_VERSION_81  { 20; }
## @Devs: set the following constant always to the latest version supported by ARSPerl
sub ARS_MAX_API { ARS_VERSION_81; }

sub ARSVersionString {
	my $APIVersionID = shift;
	my $api2Version = {
		&ARS_VERSION_45 => '4.5',
		&ARS_VERSION_50 => '5.0',
		&ARS_VERSION_51 => '5.1',
		&ARS_VERSION_60 => '6.0',
		&ARS_VERSION_63 => '6.3',

RELNOTES  view on Meta::CPAN

The 1.6 release marks the first real NT port. v1.5x attempted a port
to Active State's Perl for Windows, but wasn't successful. Bill Middleton
re-worked the source code and merged it into Gurusamy Sarathy's 
version of perl for windows. 

1.5 Notes
---------

This release contains serveral bug fixes and minor feature additions.
An effort was made to implement the remaining ARS functions, however,
it proved to be very time consuming to implement and test them. Therefore,
in this release most of the remaining functions have been implemented. 
The rest will likely be implemented in a future release. See TODO for
a list of remaining functions.

1.4 Notes 
---------

The notifier functions have been added to the main package. This allows
a script to connect and register itself as a user and then receive 
notifications (examples are included).  You can also send notifications from 

changes.dat  view on Meta::CPAN

TS  fixed return value of ars_Import
TS  fixed memory violation in ars_GetListContainer
TS  implemented ars_qualifier_ptr function (inverse of ars_perl_qualifier)
TS  added ownerObjList parameter to ars_GetListContainer
TS  fixed AR_SERVER_INFO type identification in infra/exsi.pl
TS  updated version numbers in INSTALLATION
TS  added ars_DateToJulianDate, ars_GetListLicense, ars_ValidateMultipleLicenses,
    ars_GetServerCharSet, ars_GetClientCharSet
TS  fixed actionList/elseList bug in ars_SetActiveLink
TS  added AR_DATA_TYPE_VIEW handling to perl_ARValueStruct_Assign,rev_ARActiveLinkActionList
TS  modified Makefile.PL for easier automated testing (handling of ARSPERLTEST_PARAM)
TS  added ars_GetListRole, ars_Signal, ars_GetTextForErrorMessage
!TS  changed return struct of ars_GetListGroup
TS  fixed IVLD macro in support-h.template

released=05/06/2008 version=1.91
TS  fixed ars_padEntryid to work correctly if entry ID prefix is defined
TS  replaced malloc-on-windows patch by UNDEF_PERL_MALLOC compilation option in Makefile.PL
TS  fixed pointer initialization error in ars_SetVUI
TS  modified ars_Create/Get/SetFilter for API 7.1
TS  fixed ars_GetAlertCount

changes.dat  view on Meta::CPAN

TS  added conversion functions rev_ARDisplayInstanceList,
    rev_ARDisplayInstanceStruct and rev_ARPermissionList
TS  fixed DESTROY(ctrl) (use safefree if allocated with safemalloc)
TS  minor fix in in rev_ARValueStructKW2KN (*keyword == '\0')
TS  minor fix in rev_ARCoordList_helper ( if (hv_exists("x"... )
TS  changed handling of keyword values in rev_ARValueStruct
    (assume "keyword" if first character == '\0' and length > 0)  
JCM minor update to example scripts Dump_User*.pl

released=09/20/2005 version=1.85
TS  added binmode-statements in t/10entry.t (test failed on win32)
TS  warning cleanup in test files (t/02export.t, t/13join.t)
TS  added ars_SetLogging (changes to ARS.xs, ARS.pm, support.c, support-h.template,
    html/manual/toc.html;  new files: html/manual/ars_SetLogging.html, t/21setlogging.t)
TS  fixed pointer dereferencing error in supportrev.c:strmakHval
TS  fixed supportrev.c:strcasecmp, strncasecmp; failure to differentiate between 
    string and substring (e.g. "page_holder" and "page")
TS  fixed support.c:perl_ARByteList (Bug ID 1213180)
    (David Lindes {lindes at users.sourceforge.net})
TS  added support for DATA_TYPE_CURRENCY to perl_ARFieldLimitStruct
TS  added function perl_ARCurrencyDetailList
TS  fixed support.c:my_strtok, perl_BuildEntryList

changes.dat  view on Meta::CPAN

JCM memory leak fixed in ars_SetEntry
JCM memory leak fixed in ars_MergeEntry
JCM memory leak fixed in ars_Export
JCM memory leak fixed in ars_GetListEntry wrt to join forms
JCM memory leak fixed in QualifierStructPtr destructor
JCM memory leak fixed in ControlStruct destructor
JCM various other memory related cleanups
JCM bad/NULL ref fixed in ExpandCharMenu
JCM added new params to ars_Login: lang, authString, tcpport, rpcnumber
JCM added new rv's to ars_GetControlStructFields: lang, authString
JCM updated example and test scripts 
JCM added Alert functions (replaces NT/Notifier functions)
!JCM 5.x (5.0.1, 5.1, 5.1.1) integration<BR>
	functions that no longer are available or always
	return errors indicating they are no longer implemented:
	<blockquote>
		ars_NT*()   [notifier functions]
	</blockquote>
	functions whose parameters have changed:
	<blockquote>
		ars_GetListEntry()<BR>

changes.dat  view on Meta::CPAN

released=12/3/99 version=1.66
JCM  fixed a typo in support.c 

released=11/23/99 version=1.65
JCM  added better support for decoding filters/activelinks
     for arsystem 4.0 (not finished yet)
JCM  added support for data type "decimal" when performing
     (Set|Create)Entry

released=04/7/99 version=1.6403 BETA
JCM  tested/fixed compiling against pre-4.0 apis. 
JCM  OO: now checks named params to ensure you don't
           mis-spell them.
JCM  attachment allows specify a 'name' hash key so you can
           customize the name that appears in the attachment field
           in the usertool.  (Nick Stoughton {NickS at ISRWORLD.com})
JCM  OO: form->setSort method added
JCM  OO: better error handling/catching
JCM  OO: fixed bug in value2internal
JCM  fixed NTRegisterServer(), fixed example/3.x/Notifier.pl
JCM  OO: fixed ARS::AR_RETURN_* bugs { erik.dorfman at intelsat.int }

changes.dat  view on Meta::CPAN


released=03/12/99 version=1.6400 BETA
JCM  added new LIBS line to Makefile.PL to cover NCR Unix
           ("Hill, David K" {david.k.hill at intel.com})
JCM  added ars_GetEntryBLOB (attachment field handling) 
           thanks to  "Kaelin Colclasure" {kaelin at talarian.com}
           for supplying part of the code for the BLOB functions.
JCM  simplified Makefile.PL configuration steps
JCM  added attachment example scripts
JCM  added basic OO layer
JCM  added small test suite
JCM  fixed some broken 4.0 related conditional compilation
           stuff
JCM  makefile now automatically converts C header files into
           perl files so that all constants (C 'defines') are
           available.

released=01/04/99  version=1.63
JCM  fixed some missing conditional compilation #if's in code
JCM  changes "require Config" to "use Config" in Makefile.PL
           at the request of activestate

example/GetCharMenu.pl  view on Meta::CPAN

#
# AUTHOR
#   Jeff Murphy
#   jcmurphy@acsu.buffalo.edu
#
# $Log: GetCharMenu.pl,v $
# Revision 1.8  2003/03/28 05:51:56  jcmurphy
# more 5.x edits
#
# Revision 1.7  2001/10/24 14:21:27  jcmurphy
# MergeEntry doc update, minor test/example tweaks
#
# Revision 1.6  2000/05/24 18:05:26  jcmurphy
# primary ars4.5 integration in this checkpoint.
#
# Revision 1.5  1998/10/14 13:55:34  jcmurphy
# fixed syntax error
#
# Revision 1.4  1998/09/16 14:38:31  jcmurphy
# updated changeDiary code
#

example/GetFilter.pl  view on Meta::CPAN

#   ARS apparently sorts the operations for you (based on their
#   mathematical precedence) so you should evaluate the tree from 
#   the bottom up. 
#
#   ars_web.cgi has an evaluation routine for computing the value
#   of a arith structure. we will probably break it out into a
#   perl module.
#
# THOUGHTS
#   I don't know if this routine will work for all cases.. but
#   i did some tests and it looked good. Ah.. i just wrote it
#   for the fun of it.. so who cares? :)

sub PrintArith {
    my $a = shift;

    PrintArith_Recurs($a, 0);
    print "\n";
}

sub PrintArith_Recurs {

example/Show_ALink.pl  view on Meta::CPAN

#   ARS apparently sorts the operations for you (based on their
#   mathematical precedence) so you should evaluate the tree from 
#   the bottom up. 
#
#   ars_web.cgi has an evaluation routine for computing the value
#   of a arith structure. we will probably break it out into a
#   perl module.
#
# THOUGHTS
#   I don't know if this routine will work for all cases.. but
#   i did some tests and it looked good. Ah.. i just wrote it
#   for the fun of it.. so who cares? :)

sub PrintArith {
    my $a = shift;

    PrintArith_Recurs($a, 0);
    print "\n";
}

sub PrintArith_Recurs {

example/ars_GetEntryBLOB.pl  view on Meta::CPAN

#!/oratest/perl/bin/perl

use ARS;

($S, $U, $P, $schema, $entry, $field) = (shift, shift, shift,
					 shift, shift, shift);

$c = ars_Login($S, $U, $P);
%f = ars_GetFieldTable($c, $schema);
foreach (keys %f) {
  $r{$f{$_}} = $_;

example/ars_GetEntryBLOB.pl  view on Meta::CPAN

sub ra {
  my $fid = shift;

  print "\t[Retrieving attachment.]\n";

  
  # file: $a = 0 || 1
  # buff: $a = undef || attachment


  unlink('/tmp/attachtest', '/tmp/attachtest2');

  ars_GetEntryBLOB($c, $schema, $entry,
		   $fid, 
		   ARS::AR_LOC_FILENAME,
		   "/tmp/attachtest") || 
		     die ("GetEntryBLOB: $ars_errstr");

  my $a = ars_GetEntryBLOB($c, $schema, $entry,
			   $fid, 
			   ARS::AR_LOC_BUFFER);

  die "GetEntryBLOB: $ars_errstr" if(!defined($a));
  print "\tattachment size = ".length($a)."\n";
  open(FD, ">/tmp/attachtest2") || die "open: $!";
  print FD $a;
  close(FD);
}

sub dh {
  my $h = shift;
  foreach (keys %$h) {
    print "\t$_ = $h->{$_}\n";
  }
}

example/ars_GetListEntry.pl  view on Meta::CPAN

for ( my $i = 0 ; $i < $#sorted_entries ; $i += 2 ) {
    printf( "%s %s\n", $sorted_entries[$i], $sorted_entries[ $i + 1 ] );
}

# another format: specify a custom query list field-list.

print "Testing: basic + sorting + custom field-list format.\n";

if ( !defined( $fids{$login_name} ) || !defined( $fids{$full_name} ) ) {
    print
"Sorry. Either i can't find the field-id for \"$login_name\" or \"$full_name\"\n on your \"$schema\" form. I'm skipping this test.\n";
}
else {
    (
        my @basic_sorted_entries = ars_GetListEntry(
            $ctrl, $schema, $qual, 0, 0,
            [
                {
                    columnWidth => 10,
                    separator   => ' ',
                    fieldId     => $fids{$login_name}

example/attachTest.pl  view on Meta::CPAN

#!/oratest/perl/bin/perl

use ARS;

$c = ars_Login(shift, shift, shift);
%f = ars_GetFieldTable($c, "ARSperl Test");
foreach (keys %f) {
  $r{$f{$_}} = $_;
}

print "Creating new entry with an attachment..\n";

($id = ars_CreateEntry($c, "ARSperl Test", 
		$f{'Attachment Field'}, { file => "/tmp/test", size => 0 },
		#$f{'Attachment Field'}, { buffer => "/tmp/test", size => 9 },
		$f{'Submitter'}, "jeff",
		$f{'Status'}, 1,
		$f{'Short Description'}, "none")) || 
  die "CreateEntry: $ars_errstr";

print "Created entry $id\n";

print "Fetching the entry we just made..\n";

%v = ars_GetEntry($c, "ARSperl Test", $id);

example/attachTest.pl  view on Meta::CPAN

  print "\t[Retrieving attachment.]\n";

  
  # file: $a = 0 || 1
  # buff: $a = undef || attachment


  ars_GetEntryBLOB($c, "ARSperl Test", $id,
		   $fid, 
		   ARS::AR_LOC_FILENAME,
		   "/tmp/attachtest") || 
		     die ("GetEntryBLOB: $ars_errstr");

  my $a = ars_GetEntryBLOB($c, "ARSperl Test", $id,,
			   $fid, 
			   ARS::AR_LOC_BUFFER);

  die "GetEntryBLOB: $ars_errstr" if(!defined($a));
  print "\tattachment size = ".length($a)."\n";
  open(FD, ">/tmp/attachtest2") || die "open: $!";
  print FD $a;
  close(FD);
}

sub dh {
  my $h = shift;
  foreach (keys %$h) {
    print "\t$_ = $h->{$_}\n";
  }
}

example/getAttachment-OO.pl  view on Meta::CPAN

#!/oratest/perl/bin/perl

use ARS;

$c = new ARS(shift, shift, shift);
$s = $c->openForm("ARSperl Test");
%v = $s->getAsHash(-entry => "000000000000002");

print "field/value dump:\n";

foreach (keys %v) {

example/getAttachment-OO.pl  view on Meta::CPAN

sub ra {
  my $field = shift;

  print "\t[Retrieving attachment.]\n";

  # file: $a = 0 || 1
  # buff: $a = undef || attachment

  $s->getAttachment(-entry => "000000000000002",
		    -field => $field,
		    -file  => "/tmp/attachtest");

  my $a = $s->getAttachment(-entry => "000000000000002",
			    -field => $field);

  print "\tattachment size = ".length($a)."\n";
  open(FD, ">/tmp/attachtest2") || die "open: $!";
  print FD $a;
  close(FD);

  # if you "cmp" the files, they should be identical.
}

sub dh {
  my $h = shift;
  foreach (keys %$h) {
    print "\t$_ = $h->{$_}\n";

html/changes.html  view on Meta::CPAN

<tr bgcolor='#eeeeee'><td width='10%'>(TS)</td><td width='90%'><font color='black'>fixed AR_SERVER_INFO type identification in infra/exsi.pl 
</font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(TS)</td><td width='90%'><font color='black'>updated version numbers in INSTALLATION 
</font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(TS)</td><td width='90%'><font color='black'>added ars_DateToJulianDate, ars_GetListLicense, ars_ValidateMultipleLicenses, 
ars_GetServerCharSet, ars_GetClientCharSet </font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(TS)</td><td width='90%'><font color='black'>fixed actionList/elseList bug in ars_SetActiveLink 
</font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(TS)</td><td width='90%'><font color='black'>added AR_DATA_TYPE_VIEW handling to perl_ARValueStruct_Assign,rev_ARActiveLinkActionList 
</font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(TS)</td><td width='90%'><font color='black'>modified Makefile.PL for easier automated testing (handling of ARSPERLTEST_PARAM) 
</font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(TS)</td><td width='90%'><font color='black'>added ars_GetListRole, ars_Signal, ars_GetTextForErrorMessage 
</font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(TS)</td><td width='90%'><font color='red'>changed return struct of ars_GetListGroup 
</font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(TS)</td><td width='90%'><font color='black'>fixed IVLD macro in support-h.template 
</table></td></tr></table>

<P>

html/changes.html  view on Meta::CPAN

      BGCOLOR='black'>
      <TR>
	<TD width='100%'>
	  <TABLE CELLSPACING='0' CELLPADDING='3' WIDTH='100%' BORDER='0'
	    BGCOLOR='lightblue'>
	    <tr><td colspan='2'>
  <table width='100%' border='0'><tr>
	      <td width='50%'>Released: <B>09/20/2005</B></td>
              <td width='50%'>Version: <B>1.85
</B></td>
  </tr></table></td>
            </tr><tr bgcolor='#eeeeee'><td width='10%'>(TS)</td><td width='90%'><font color='black'>added binmode-statements in t/10entry.t (test failed on win32) 
</font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(TS)</td><td width='90%'><font color='black'>warning cleanup in test files (t/02export.t, t/13join.t) 
</font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(TS)</td><td width='90%'><font color='black'>added ars_SetLogging (changes to ARS.xs, ARS.pm, support.c, support-h.template, 
html/manual/toc.html;  new files: html/manual/ars_SetLogging.html, t/21setlogging.t) </font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(TS)</td><td width='90%'><font color='black'>fixed pointer dereferencing error in supportrev.c:strmakHval 
</font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(TS)</td><td width='90%'><font color='black'>fixed supportrev.c:strcasecmp, strncasecmp; failure to differentiate between  
string and substring (e.g. "page_holder" and "page") </font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(TS)</td><td width='90%'><font color='black'>fixed support.c:perl_ARByteList (Bug ID 1213180) 
(David Lindes {lindes at users.sourceforge.net}) </font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(TS)</td><td width='90%'><font color='black'>added support for DATA_TYPE_CURRENCY to perl_ARFieldLimitStruct 

html/changes.html  view on Meta::CPAN

<tr bgcolor='#eeeeee'><td width='10%'>(JCM)</td><td width='90%'><font color='black'>memory leak fixed in ControlStruct destructor 
</font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(JCM)</td><td width='90%'><font color='black'>various other memory related cleanups 
</font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(JCM)</td><td width='90%'><font color='black'>bad/NULL ref fixed in ExpandCharMenu 
</font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(JCM)</td><td width='90%'><font color='black'>added new params to ars_Login: lang, authString, tcpport, rpcnumber 
</font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(JCM)</td><td width='90%'><font color='black'>added new rv's to ars_GetControlStructFields: lang, authString 
</font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(JCM)</td><td width='90%'><font color='black'>updated example and test scripts  
</font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(JCM)</td><td width='90%'><font color='black'>added Alert functions (replaces NT/Notifier functions) 
</font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(JCM)</td><td width='90%'><font color='red'>5.x (5.0.1, 5.1, 5.1.1) integration<BR> 
functions that no longer are available or always return errors indicating they are no longer implemented: <blockquote> ars_NT*()   [notifier functions] </blockquote> functions whose parameters have changed: <blockquote> ars_GetListEntry()<BR> ars_Get...

<P>


    <TABLE CELLSPACING='0'

html/changes.html  view on Meta::CPAN

      BGCOLOR='black'>
      <TR>
	<TD width='100%'>
	  <TABLE CELLSPACING='0' CELLPADDING='3' WIDTH='100%' BORDER='0'
	    BGCOLOR='lightblue'>
	    <tr><td colspan='2'>
  <table width='100%' border='0'><tr>
	      <td width='50%'>Released: <B>04/7/99</B></td>
              <td width='50%'>Version: <B>1.6403 BETA
</B></td>
  </tr></table></td>
            </tr><tr bgcolor='#eeeeee'><td width='10%'>(JCM)</td><td width='90%'><font color='black'>tested/fixed compiling against pre-4.0 apis.  
</font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(JCM)</td><td width='90%'><font color='black'>OO: now checks named params to ensure you don't 
mis-spell them. </font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(JCM)</td><td width='90%'><font color='black'>attachment allows specify a 'name' hash key so you can 
customize the name that appears in the attachment field in the usertool.  (Nick Stoughton {NickS at ISRWORLD.com}) </font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(JCM)</td><td width='90%'><font color='black'>OO: form->setSort method added 
</font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(JCM)</td><td width='90%'><font color='black'>OO: better error handling/catching 
</font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(JCM)</td><td width='90%'><font color='black'>OO: fixed bug in value2internal 

html/changes.html  view on Meta::CPAN

            </tr><tr bgcolor='#eeeeee'><td width='10%'>(JCM)</td><td width='90%'><font color='black'>added new LIBS line to Makefile.PL to cover NCR Unix 
("Hill, David K" {david.k.hill at intel.com}) </font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(JCM)</td><td width='90%'><font color='black'>added ars_GetEntryBLOB (attachment field handling)  
thanks to  "Kaelin Colclasure" {kaelin at talarian.com} for supplying part of the code for the BLOB functions. </font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(JCM)</td><td width='90%'><font color='black'>simplified Makefile.PL configuration steps 
</font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(JCM)</td><td width='90%'><font color='black'>added attachment example scripts 
</font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(JCM)</td><td width='90%'><font color='black'>added basic OO layer 
</font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(JCM)</td><td width='90%'><font color='black'>added small test suite 
</font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(JCM)</td><td width='90%'><font color='black'>fixed some broken 4.0 related conditional compilation 
stuff </font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(JCM)</td><td width='90%'><font color='black'>makefile now automatically converts C header files into 
perl files so that all constants (C 'defines') are available. </table></td></tr></table>

<P>


    <TABLE CELLSPACING='0'

html/copying.html  view on Meta::CPAN

These requirements apply to the modified work as a whole.  If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works.  But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.<p>

Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.<p>

In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.<p>

<dt>3. 

html/copying.html  view on Meta::CPAN

all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.<p>

If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.<p>

It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices.  Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.<p>

This section is intended to make thoroughly clear what is believed to

html/copying.html  view on Meta::CPAN

OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.<p>
</dl>
<center><p align=center>END OF TERMS AND CONDITIONS</p></center>
<hr>
<center><h2 align=center>Appendix: How to Apply These Terms to Your New Programs</h2></center>

If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.<p>

To do so, attach the following notices to the program.  It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.<p>

<dl>
<dd>&lt;one line to give the program's name and a brief idea of what it does.><br>

html/index.html  view on Meta::CPAN

The current release is version 1.91 and has support for the AR 5.0
through 7.1
API.
<p> </p>

<h2> <a href="changes.html">Release Notes</a>
</h2>

<h2> Support OS's </h2>

The perl extension has been tested on the following OS's:
<ul>

  <li> Solaris 2.x </li>

  <li> SunOS 4.x </li>

  <li> Irix </li>

  <li> HP-UX </li>

html/manual/OO/index.html  view on Meta::CPAN

	the ARS C API. At first, these handlers map to the Perl "die" and
	"warn" functions. You can, however, disable or over-ride this
	feature and install your own handlers. <P>

	Have a look at the <A href="connection.html#new">Connection Object's   
        constructor method</A>. <P>

        Also examine the <code>t/entry.t</code> script available in the
        source distribution for an example of how to use this. <P>

        Basically, what this means is you don't have to test the
        return code of each call you make. If a call encounters a problem
	while doing it's job, it'll call an exception handler to handle
	the problem.<P>

<DT> <B> Wide Variety of API Calls </B> <DD>

	Since the OO layer is written ontop of ARSperl itself, you can "mix 
	and match" the two within scripts. This allows you access to all of 
	the API calls you've come to use while allowing you to utilize some 
	OOP practices where available. You don't need to login twice, the

html/manual/ars_GetEntryBLOB.html  view on Meta::CPAN

          <DT><B>On failure</B><DD>
              Returns <CODE>undef</CODE>.
      </DL>

      <P>Example:

      <PRE>
  ars_GetEntryBLOB($c, "00-Test", "000000000000001",
		   $fid, 
		   ARS::AR_LOC_FILENAME,
		   "/tmp/attachtest") || 
		     die ("GetEntryBLOB: $ars_errstr");

  my $a = ars_GetEntryBLOB($c, "00-Test", "000000000000001",
			   $fid, 
			   ARS::AR_LOC_BUFFER);

  die "GetEntryBLOB: $ars_errstr" if(!defined($a));
  print "blob size = ".length($a)."\n";
  open(FD, "&gt;/tmp/attachtest2") || die "open: $!";
  print FD $a;
  close(FD);
      </PRE>

<P>

A subsequent comparison of the two files <CODE>/tmp/attachtest</code>
and <code>/tmp/attachtest2</code> should show that they are identical.

<HR WIDTH="30%">
<P>
<A HREF="toc.html"><IMG ALT="&lt;--" SRC="arrow.gif" ALIGN=CENTER> Table of
	Contents </A>
<p>
<address>
Last changes to this page 9th March 1999 by jeff murphy <BR>
&#169; J.C.Murphy, J.W.Murphy 1997 arsperl@arsperl.org
</address>

supportrev.c  view on Meta::CPAN

/* helper routine to above routine. does the actual data copying once
 * main routine has verified that everything is OK.
 */

static int
rev_ARActiveLinkActionList_helper(ARControlStruct * ctrl, HV * h, ARActiveLinkActionList * al, int idx)
{
	int             rv = 0;

	/*
	 * test each has value in turn, first one that is defined, copy in
	 * and return. DDE: not implemented.
	 */

	if (hv_exists(h,  "process", strlen("process") )) {
		al->actionList[idx].action = AR_ACTIVE_LINK_ACTION_PROCESS;
		rv += strmakHVal(h, "process", &(al->actionList[idx].u.process));
	} else if (hv_exists(h,  "macro", strlen("macro") )) {
		al->actionList[idx].action = AR_ACTIVE_LINK_ACTION_MACRO;
		rv += rev_ARActiveLinkMacroStruct(ctrl, h, "macro",
					    &(al->actionList[idx].u.macro));

supportrev.c  view on Meta::CPAN

		"rev_ARAssignStruct: first argument is not a hash");
	return -1;
}

static int
rev_ARAssignStruct_helper(ARControlStruct * ctrl, HV * h, ARAssignStruct * m)
{
	int             rv = 0;

	/*
	 * test each key in turn, first one that is defined, copy in and
	 * return. DDE: not implemented.
	 */

	if (hv_exists(h,  "process", strlen("process") )) {
		m->assignType = AR_ASSIGN_TYPE_PROCESS;
		rv += strmakHVal(h, "process", &(m->u.process));
	} else if (hv_exists(h,  "value", strlen("value") )) {
		m->assignType = AR_ASSIGN_TYPE_VALUE;
		rv += rev_ARValueStruct(ctrl, h, "value", "valueType", &(m->u.value));
	}

t/00connect.t  view on Meta::CPAN

#!./perl

#
# test out connecting to an arserver
#

# TEST    DESC
# 1       explicit ars_Login / ars_Logoff
# 2       explicit login, implicit Logoff via GC
# 3       OO login / logoff

use ARS;
require './t/config.cache';

print "1..3\n";

# make non-oo connect

# test 1 -> login/logout

my($ctrl) = ars_Login(&CCACHE::SERVER, 
		      &CCACHE::USERNAME, 
 		      &CCACHE::PASSWORD, "", "", &CCACHE::TCPPORT);

if(!defined($ctrl)) {
  print "not ok [1 $ars_errstr]\n";
} else {
  print "ok [1]\n";
  ars_Logoff($ctrl);

t/00connect.t  view on Meta::CPAN

  }
}

# if built with debugging, we should see $c2 be
# DESTROYed at this point


# make an OO connection. note that we disable exception
# catching so we can detect the errors manually.

# test 3 -> constructor

my $c = new ARS(-server => &CCACHE::SERVER, 
                -username => &CCACHE::USERNAME,
		-password => &CCACHE::PASSWORD,
		-tcpport  => &CCACHE::TCPPORT,
		-catch => { ARS::AR_RETURN_ERROR => undef,
			    ARS::AR_RETURN_WARNING => undef,
			    ARS::AR_RETURN_FATAL => undef
			  },
	       -debug => undef);

t/01import.t  view on Meta::CPAN

#!./perl

# 
# test out importing a schema definition
#

use ARS;
require './t/config.cache';

print "1..1\n";

my($ctrl) = ars_Login(&CCACHE::SERVER, &CCACHE::USERNAME, &CCACHE::PASSWORD, "", "", &CCACHE::TCPPORT);
if(!defined($ctrl)) {
  print "not ok (login $ars_errstr)\n";
  exit 0;
}

my $d = "aptest.def";

# if we're compiled against 4.0, we'll import a schema
# with an attachment field so we can test that out.

if(ars_APIVersion() >= 6) {
  $d = "aptest51.def";
}elsif(ars_APIVersion() >= 4) {
  $d = "aptest50.def";
}


#  delete the schema (assuming it already exists). if it doesnt,
#  we ignore the error.

ars_DeleteSchema($ctrl, "ARSperl Test", ARS::AR_SCHEMA_FORCE_DELETE); 
ars_DeleteSchema($ctrl, "ARSperl Test2", ARS::AR_SCHEMA_FORCE_DELETE); 
ars_DeleteSchema($ctrl, "ARSperl Test-join", ARS::AR_SCHEMA_FORCE_DELETE); 
ars_DeleteSchema($ctrl, "ARSperl Test3", ARS::AR_SCHEMA_FORCE_DELETE); 

t/02export.t  view on Meta::CPAN

require './t/config.cache';

print "1..9\n";

my($ctrl) = ars_Login(&CCACHE::SERVER, &CCACHE::USERNAME, &CCACHE::PASSWORD, "", "", &CCACHE::TCPPORT);
if(!defined($ctrl)) {
  print "not ok (login $ars_errstr)\n";
  exit 0;
}

my $d = "aptest.def";
if(ars_APIVersion() >= 4) {
  $d = "aptest50.def";
}

my $def = "";
my $c = 1;

my @objects =  (
		"schema", "ARSperl Test",
		"schema", "ARSperl Test2",
		"schema", "ARSperl Test-join",
		"filter", "ARSperl Test-Filter1",

t/09qualifier.t  view on Meta::CPAN

#!./perl

#
# test out building qualifiers 
#

# TEST    DESC
# 1       explicit ars_Login / ars_Logoff
# 2       build qual, explicitly destroy it
# 3       build, implicitly destroy (out of scope)
# 4       build, implicitly destroy (exit)

use ARS;
require './t/config.cache';

print "1..4\n";

# test 1 -> login/logout

my($ctrl) = ars_Login(&CCACHE::SERVER, 
		      &CCACHE::USERNAME, 
 		      &CCACHE::PASSWORD, "","", &CCACHE::TCPPORT);

if(!defined($ctrl)) {
  print "not ok [1]\n";
} else {
  print "ok [1]\n";
}

t/10entry.t  view on Meta::CPAN

#!./perl

# 
# test out creating and deleting an entry
#

use ARS;
require './t/config.cache';

# notice the use of a custom error handler.

sub mycatch {
  my ($type, $msg) = (shift, shift);
  die "not ok ($msg)\n";

t/10entry.t  view on Meta::CPAN

                -catch => { ARS::AR_RETURN_ERROR => "main::mycatch",
                            ARS::AR_RETURN_WARNING => "main::mycatch",
                            ARS::AR_RETURN_FATAL => "main::mycatch"
                          },
		-debug => undef);
print "ok [1 cnx]\n";

my $s  = $c->openForm(-form => "ARSperl Test");
print "ok [2 openform]\n";

# test 1:  create an entry

my $id = $s->create("-values" => { 'Submitter' => &CCACHE::USERNAME,
				 'Status' => 'Assigned',
				 'Short Description' => 'A test submission',
				   'Diary Field' => 'A diary entry'
			       }
		   );
print "ok [3 create]\n";

# test 2: retrieve the entry to see if it really worked

my($v_status,
   $v_diary) = $s->get(-entry => $id, -field => [ 'Status', 'Diary Field' ] );

# status should be "Assigned" and the diary should contain
# the expected text, with user=ourusername
#use Data::Dumper;
#print "vd ", Dumper($v_diary), "\n";

if( ($v_status ne "Assigned") || 
    ($v_diary->[0]->{'value'} ne "A diary entry") ||
    ($v_diary->[0]->{'user'} ne &CCACHE::USERNAME) ) {
  print "not ok [4 $v]\n";
} else {
  print "ok [4 get]\n";
}

# test 3: set the entry to something different

$s->set(-entry => $id, -values => { 'Status' => 'Rejected' });
print "ok [5 set]\n";

# test 4: retrieve the value and check it

$v = $s->get(-entry => $id, -field => [ 'Status' ] );
if($v ne "Rejected") {
  print "not ok [6 $v]\n";
} else {
  print "ok [6 get]\n";
}

# test 6: add an attachment to the existing entry

if(ars_APIVersion() >= 4) {
  my $filename = "t/aptest40.def";

  $s->set(-entry => $id, 
	  "-values" => { 'Attachment Field' => 
		       { file => $filename,
		         size => (stat($filename))[7]
		       }
		     }
	 );

  # retrieve it "in core" 

t/10entry.t  view on Meta::CPAN

  binmode FD;
  my $fc;
  while(<FD>) {
    $fc .= $_;
  }
  close(FD);

  if($fc ne $ic) {
    print "not ok [attach (create) cmp] fc ", length($fc), " ic ", length($ic), "\n";
  } else {
    print "ok [attach (set) test ; fclen=", length($fc),
		" iclen=", length($ic), "]\n";
  }
}

# test 7: create a new entry with an attachment

if(ars_APIVersion() >= 4) {
  my $filename = "t/aptest40.def";

  my $nid = $s->create(
		       "-values" => { 'Attachment Field' => 
				      { file => $filename,
					size => (stat($filename))[7]
				      },
				      'Submitter' => &CCACHE::USERNAME,
				      'Status' => 'Assigned',
				      'Short Description' => 'attach-create'
				    }

t/10entry.t  view on Meta::CPAN

  binmode FD;
  my $fc;
  while(<FD>) {
    $fc .= $_;
  }
  close(FD);

  if($fc ne $ic) {
    print "not ok [attach (create) cmp]\n";
  } else {
    print "ok [attach (create) test ; fclen=", length($fc),
		" iclen=", length($ic), "]\n";
  }


  # retrieve it as a file

  my $ga_rv = $s->getAttachment(-entry => $nid,
				-field => 'Attachment Field',
				-file  => 'attach.txt');

t/10entry.t  view on Meta::CPAN

  } else {
    print "ok [get attach to file]\n";
  }

  # cleanup
  unlink ('attach.txt');
  $s->delete(-entry => $nid);
}


# test 8: finally, delete the newly created entry

$s->delete(-entry => $id);
	   
print "ok [delete]\n";

exit 0;

t/10getlist.t  view on Meta::CPAN

#!perl

use ARS;
use strict;
require './t/config.cache';

use Test::More tests => 9;

my $c = ars_Login(&CCACHE::SERVER, 
		  &CCACHE::USERNAME,
                  &CCACHE::PASSWORD, "","", &CCACHE::TCPPORT);

ok(defined($c), "login") || diag "login: $ars_errstr";

SKIP: {
	skip 8, "login failed" unless defined($c);

t/10getlist.t  view on Meta::CPAN

		diag "GetListFilter ($#a) $ars_errstr";

	@a = ars_GetListGroup($c);
	ok(@a, "GetListGroup") || 
		diag "GetListGroup $ars_errstr";

	@a = ars_GetListSchema($c, 0, 0 + 1024);
	ok(@a, "GetListSchema") ||
		diag "GetListSchema $ars_errstr";

	# since this test can fail and still be OK
	# (/etc/ar is empty) we wont do it.
	#@a = ars_GetListServer();

	# this test might fail if the sql is bad or this
	# isnt an admin account we are running with
	@a = ars_GetListSQL($c, "select name, schemaid, nextid from arschema");
	ok(@a, "GetListSQL") || 
		diag("GetListSQL ($ars_errstr) - it's OK if this fails");

	@a = ars_GetListUser($c);
	ok (@a, "GetListUser") ||
		diag("GetListUser ($ars_errstr)");

	@a = ars_GetListVUI($c, "ARSperl Test");

t/11entry.t  view on Meta::CPAN

#!./perl

# 
# test out creating/retrieving lots of entries 
# to test for memory leaks. by default, we bypass this test
# because it takes a long time and the user needs to do
# extra work to watch process-size, etc.


use ARS;
require './t/config.cache';

# notice the use of a custom error handler.

sub mycatch {

t/11entry.t  view on Meta::CPAN

                -catch => { ARS::AR_RETURN_ERROR => "main::mycatch",
                            ARS::AR_RETURN_WARNING => "main::mycatch",
                            ARS::AR_RETURN_FATAL => "main::mycatch"
                          },
		-debug => undef);
print "ok [1]\n";

my $s  = $c->openForm(-form => "ARSperl Test");
print "ok [2]\n";

# test 1:  create many

my %eids;

for(my $loop = 0; $loop < 10000 ; $loop++) {
	my $id = $s->create("-values" => { 'Submitter' => &CCACHE::USERNAME,
				 'Status' => 'Assigned',
				 'Short Description' => $loop
			       }
		   );
	$eids{$id} = $loop;
$|=1;
print "$id  $loop         \r";
}

print "ok [3]\n";

# test 2: retrieve the entries 

foreach my $id (keys %eids) {
	my @v = $s->get(-entry => $id );
print "$id        \r";
}

print "ok [4]\n";

# test 5: finally, delete the newly created entry

foreach my $id (keys %eids) {
	$s->delete(-entry => $id);
}

print "ok [5]\n";

exit 0;

t/20merge.t  view on Meta::CPAN

#!./perl
use ARS;
require './t/config.cache';

my $maxtest = 5;

print "1..$maxtest\n";

my $c = ars_Login(&CCACHE::SERVER, 
		  &CCACHE::USERNAME, 
		  &CCACHE::PASSWORD, "","", &CCACHE::TCPPORT);

if(!defined($c)) {
	for(my $i = 1 ; $i <= $maxtest ; $i++) {
		print "not ok [$i] [ctrl]\n";
	}
	exit 0;
} else {
	print "ok [1]\n";
}

my %fids = ars_GetFieldTable($c, "ARSperl Test");

if(!(%fids)) {
	for(my $i = 2 ; $i <= $maxtest ; $i++) {
		print "not ok [$i] [gft]\n";
	}
	exit 0;
} else {
	print "ok [2]\n";
}


# There are three conditions to detect after ars__MergeEntry(...). 
# 1. A non-null value returned means that a new entry was created. 

t/20merge.t  view on Meta::CPAN

$eid2 = $oof->merge(-type => &ARS::AR_MERGE_ENTRY_DUP_MERGE, 
		    -values => {
				'Request ID' => $eid, 
				'Submitter' => 'xyz',
				'Short Description' => 'oo-foobar',
				'Status' => 'Rejected'
				}
		    );

# since we disabled exception handling (in the 'new' above)
# we can test $eid2 

if($eid2 eq $eid) {
	print "ok [5]\n";
} else {
	# if $eid2 is "", then the op failed completely
	# if $eid2 ne $eid, then the op succeeded, but 
	#    created a new entry - which shouldnt happen
	#    since we specified DUP_MERGE _unless_ you
	#    forgot to specify an entry-id in your values 
	#    hash

t/21setlogging.t  view on Meta::CPAN

#!./perl
use ARS;
require './t/config.cache';

my $maxtest = 7;
my $c = 1;

# perl -w -Iblib/lib -Iblib/arch t/21setlogging.t 


print "1..$maxtest\n";


my $ctrl = ars_Login( &CCACHE::SERVER, &CCACHE::USERNAME, &CCACHE::PASSWORD, "","", &CCACHE::TCPPORT );

if(!defined($ctrl)) {
	for(my $i = $c ; $i <= $maxtest ; $i++) {
		print "not ok [$i] [ctrl]\n";
	}
	exit 0;
} else {
	print "ok [$c]\n";
}


# test appending log messages to ars_errstr
++$c;
my $ret = ars_SetLogging( $ctrl,
	&ARS::AR_DEBUG_SERVER_SQL | &ARS::AR_DEBUG_SERVER_FILTER | &ARS::AR_DEBUG_SERVER_API );
if( ! $ret ) {
	print "not ok [$c] [$ars_errstr]\n";
} else {
	print "ok [$c]\n";
}


t/21setlogging.t  view on Meta::CPAN


if( ! $ret ) {
	print "not ok [$c] [$ars_errstr]\n";
} else {
	print "ok [$c]\n";
}




# test writing log messages to file

my $logfile = 't/test_SetLogging.log';
unlink $logfile if -f $logfile;

++$c;
$ret = ars_SetLogging( $ctrl,
	&ARS::AR_DEBUG_SERVER_SQL | &ARS::AR_DEBUG_SERVER_FILTER | &ARS::AR_DEBUG_SERVER_API,
	$logfile );
if( ! $ret ) {
	print "not ok [$c] [$ars_errstr]\n";
} else {
	print "ok [$c]\n";

t/31createschema.t  view on Meta::CPAN

	push @fieldIds, sort {$a <=> $b} ars_GetListField( $ctrl, $form, 0, 0b01000000 );  # column
	die "ars_GetListField( $form ): $ars_errstr\n" if $ars_errstr;

	my %tableLimit;

	( $ret, $rv ) = ( 1, 0 );
	foreach my $fieldId ( @fieldIds ){
		my $fieldSt = ars_GetField( $ctrl, $form, $fieldId );
		die "ars_GetField( $form, $fieldId ): $ars_errstr\n" if $ars_errstr; 

#		test_DisplayInstanceList( $ctrl, $form, $fieldSt );
#		next;

		$fieldSt->{changeDiary} = "COPY";

		if( ($formType ne 'join' && $fieldId <= 8) || $fieldId == 1 ){
			print "SET FIELD $fieldId $fieldSt->{dataType}\n";
			$rv = ars_SetField( $ctrl, $formNew, $fieldId, {
				fieldName => $fieldSt->{fieldName},
				limit     => $fieldSt->{limit},
				displayInstanceList => $fieldSt->{displayInstanceList},



( run in 0.563 second using v1.01-cache-2.11-cpan-3cd7ad12f66 )