ARSperl

 view release on metacpan or  search on metacpan

Makefile.PL  view on Meta::CPAN

# if you do run into problems, and don't really know what this file
# does, try subscribing to the mailing list and ask for help there.
# subscription information is available at http://www.arsperl.org/


if( $ENV{ARSPERLTEST_PARAM} ){
	( $ARSVERSION, $ARSAPI, $ARSPERLTEST_SERVER, $ARSPERLTEST_USERNAME, $ARSPERLTEST_PASSWORD, $ARSPERLTEST_TCPPORT )
		= split( /;/, $ENV{ARSPERLTEST_PARAM} );
}
my $ra_arlibs = findArLibs($ARSAPI);
# use Data::Dumper;
# print "found ar libraries: ", Dumper($ra_arlibs);

$ARAPIVERSION = findAPIVersion($ARSAPI);
$ARSVERSION = ARSVersionString($ARAPIVERSION);

$WINDOWS = $^O eq 'MSWin32';
$GNU_WIN = ($^O eq 'MSWin32' || $^O eq 'cygwin') && $Config{'cc'} eq "gcc";


$AUTODEFINES = " -g ";

example/WhoUsesIt.pl  view on Meta::CPAN


    print "Menus that use the file \"$opt_M\"... (this may take a minute or so to do)\n";

    @menus = ars_GetListCharMenu($ctrl, 0);
    if($#menus != -1) {
	foreach $menu (@menus) {
	    print "Searching: $menu\n" if $debug;
	    ($menuDef = ars_GetCharMenu($ctrl, $menu)) ||
		die "ars_GetCharMenu: $ars_errstr";
	    #next unless ($menu eq "PT-Assignees");
	    #use Data::Dumper; print Dumper($menuDef); exit 0;
	    # 3 is legacy. 
	    if( ($menuDef->{menuType} == 3) || ($menuDef->{menuType} =~ /format_quotes/i) ) {
		print "\tIs type File (points to ".qq{"$menuDef->{menuFile}{filename}"}.")\n" if $debug;
		if ($menuDef->{menuFile}{filename} =~ /$opt_M/) {
		    $users{$menu} = $1;
		}
	    }
	}
	foreach (sort keys %users) {
	    print "\t$_\n";

example/ars_GetListEntryWithMultiSchemaFields.pl  view on Meta::CPAN

my $aFields = [ 'U.101', 'U.104', 'G.105', 'G.106' ];

my $aSortList = [ 'G.106' => 1 ];


my @entries = ars_GetListEntryWithMultiSchemaFields( $ctrl, $aSchema, $hQualifier, 0, 0, $aFields, @$aSortList );
die qq/ars_GetListEntryWithMultiSchemaFields: $ars_errstr\n/ if $ars_errstr;


foreach my $hEntry ( @entries ){
	use Data::Dumper;
	print Data::Dumper->Dump( [$hEntry], ['entry'] ), "\n";
}









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

		   );
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";
}

t/32createcontainer.t  view on Meta::CPAN



sub copyContainer {
	my( $ctrl, $ctnr, $ctnrNew ) = @_;
	print '-' x 60, "\n";
#	print "GET CONTAINER $ctnr\n";
	my $ctnrObj = ars_GetContainer( $ctrl, $ctnr );
	die "ars_GetContainer( $ctnr ): $ars_errstr\n" if $ars_errstr;
#	my $ctnrType = $ctnrObj->{containerType};

#	use Data::Dumper;
#	$Data::Dumper::Sortkeys = 1;
#	print Data::Dumper->Dump( [$ctnrObj], ['ctnrObj'] );

	$ctnrObj->{name} = $ctnrNew;

	@{$ctnrObj->{objPropList}} = grep {$_->{prop} < 90000} @{$ctnrObj->{objPropList}};
	foreach my $prop ( @{$ctnrObj->{objPropList}} ){
		$prop->{value} .= 'xCopy' if $prop->{prop} == 60020 && $prop->{value} ne '';
	}
	$ctnrObj->{changeDiary} = "Init";

	my $ret = 1;

t/34createactlink.t  view on Meta::CPAN

}


sub copyObject {
	my( $ctrl, $obj, $objNew ) = @_;
	print '-' x 60, "\n";
#	print "GET ACTIVE LINK $ctnr\n";
	my $wfObj = ars_GetActiveLink( $ctrl, $obj );
	die "ars_GetActiveLink( $obj ): $ars_errstr\n" if $ars_errstr;

#use Data::Dumper;
#$Data::Dumper::Sortkeys = 1;
#my $data = $ctnrObj;
#my $file = '-';
#local *FILE;
#open( FILE, "> $file" ) or die qq{Cannot open \"$file\" for writing: $!\n};
#print FILE Data::Dumper->Dump( [$data], ['ctnrObj'] );
#close FILE;

	$wfObj->{name} = $objNew;

	@{$wfObj->{objPropList}} = grep {$_->{prop} < 90000} @{$wfObj->{objPropList}};
#	foreach my $prop ( @{$ctnrObj->{objPropList}} ){
#		$prop->{value} .= 'xCopy' if $prop->{prop} == 60020 && $prop->{value} ne '';
#	}
	$wfObj->{changeDiary} = "Init";

t/36createfilter.t  view on Meta::CPAN

}


sub copyObject {
	my( $ctrl, $obj, $objNew ) = @_;
	print '-' x 60, "\n";
#	print "GET FILTER $obj\n";
	my $wfObj = ars_GetFilter( $ctrl, $obj );
	die "ars_GetFilter( $obj ): $ars_errstr\n" if $ars_errstr;

#	use Data::Dumper;
#	$Data::Dumper::Sortkeys = 1;
#	print Data::Dumper->Dump( [$wfObj], ['wfObj'] );

	$wfObj->{name} = $objNew;

	@{$wfObj->{objPropList}} = grep {$_->{prop} < 90000} @{$wfObj->{objPropList}};
#	foreach my $prop ( @{$wfObj->{objPropList}} ){
#		$prop->{value} .= 'xCopy' if $prop->{prop} == 60020 && $prop->{value} ne '';
#	}
	$wfObj->{changeDiary} = "Init";

	my $ret = 1;

t/38createescalation.t  view on Meta::CPAN

}


sub copyObject {
	my( $ctrl, $obj, $objNew ) = @_;
	print '-' x 60, "\n";
#	print "GET ESCALATION $ctnr\n";
	my $wfObj = ars_GetEscalation( $ctrl, $obj );
	die "ars_GetEscalation( $obj ): $ars_errstr\n" if $ars_errstr;

#use Data::Dumper;
#$Data::Dumper::Sortkeys = 1;
#my $data = $ctnrObj;
#my $file = '-';
#local *FILE;
#open( FILE, "> $file" ) or die qq{Cannot open \"$file\" for writing: $!\n};
#print FILE Data::Dumper->Dump( [$data], ['ctnrObj'] );
#close FILE;

	$wfObj->{name} = $objNew;

	@{$wfObj->{objPropList}} = grep {$_->{prop} < 90000} @{$wfObj->{objPropList}};
#	foreach my $prop ( @{$ctnrObj->{objPropList}} ){
#		$prop->{value} .= 'xCopy' if $prop->{prop} == 60020 && $prop->{value} ne '';
#	}
	$wfObj->{changeDiary} = "Init";

t/40createcharmenu.t  view on Meta::CPAN

}


sub copyObject {
	my( $ctrl, $obj, $objNew ) = @_;
	print '-' x 60, "\n";
#	print "GET MENU $ctnr\n";
	my $wfObj = ars_GetCharMenu( $ctrl, $obj );
	die "ars_GetCharMenu( $obj ): $ars_errstr\n" if $ars_errstr;

#use Data::Dumper;
#$Data::Dumper::Sortkeys = 1;
#print Data::Dumper->Dump( [$wfObj], ['wfObj'] );

	$wfObj->{name} = $objNew;

	@{$wfObj->{objPropList}} = grep {$_->{prop} < 90000} @{$wfObj->{objPropList}};
#	foreach my $prop ( @{$ctnrObj->{objPropList}} ){
#		$prop->{value} .= 'xCopy' if $prop->{prop} == 60020 && $prop->{value} ne '';
#	}
	$wfObj->{changeDiary} = "Init";

	my $ret = 1;



( run in 0.309 second using v1.01-cache-2.11-cpan-4d50c553e7e )