ARS-Simple

 view release on metacpan or  search on metacpan

Config.PL  view on Meta::CPAN

        <STDIN>;
        exit(1);
    }
}
else
{
    # called directly
    unless (-d 'blib/lib')
    {
        die "Do not execute this script directly, run:\n\tperl Makefile.PL
\tmake\n\tmake test\n\tmake install\n
If you are using ActivePerl under Windows use 'nmake' or 'dmake' instead of 'make'.";
    }
}

if (($configfile && -f $configfile) || -f 'blib/lib/ARS/Simple.cfg') { exit; }

my $user     = '';
my $password = '';
my $proxy    = '';
unless ($ENV{PERL_MM_USE_DEFAULT} || $ENV{AUTOMATED_TESTING} || !-t STDIN)

Makefile.PL  view on Meta::CPAN

    dist  => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
    clean => { FILES => 'ARS-Simple-*' },
);

makeTestConfig();

if (!$ENV{AUTOMATED_TESTING})
{
    print "
    Type 'make' (windows: 'nmake' or 'dmake') to build ARS::Simple.
    Type 'make test' to test ARS::Simple before installing.
    Type 'make install' to install ARS::Simple.

    ";
}

exit 0;


sub makeTestConfig
{

Makefile.PL  view on Meta::CPAN

    my ($i, $u, $p) = ('', $ENV{USERNAME}, '');

    if(-e './t/config.cache')
    {
        do './t/config.cache';
        $i = &CCACHE::server;
        $u = &CCACHE::user;
        $p = &CCACHE::password;
    }

    print "=== ARS::Simple 'make test' configuration. ===

Test on your own dev system where you know the user you select below
is in the administrator group.

Please enter the following information. This information will be
recorded in ./t/config.cache.  YOU SHOULD REMOVE this file once
you have finished testing as the data is in plain text.

As an alternate, skip testing and install and start trying it out!

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 Remedy ARS server.

";

    $server = prompt("The Remedy server hostname (or IP Address)", $i);
    if ($server eq '') { $server = $i if ($i ne ''); }

    $user = prompt("Remedy user with admin", $u);
    if($user eq '') { $user = $u if ($u ne ''); }

README  view on Meta::CPAN

A simple interface to Remedy ARSystem utilising the ARSperl API interface.
Keeps your code more readable and by use of the cache avoids your credentials
being spread through all your scripts.

INSTALLATION

To install this module, run the following commands:

	perl Makefile.PL
	make
	make test
	make install

SUPPORT AND DOCUMENTATION

After installing, you can find documentation for this module with the
perldoc command.

    perldoc ARS::Simple

You can also look for information at:

lib/ARS/Simple.pm  view on Meta::CPAN

            croak(__PACKAGE__ . " object initialisation failed.\nFailed to log into Remedy server=" . $self->{server} . " as user '$user' with supplied password: $ars_errstr\n");
        }
    }
    else
    {
        croak(__PACKAGE__ . " object initialisation failed, server, user and password are required\n");
    }
}


    # GG test - need to find and store the current value of AR_SERVER_INFO_MAX_ENTRIES
    #           so we can set reset_limit if not defined
    #my %s = ars_GetServerInfo($self->{ctl});
    #print  Dumper(\%s);


1; # End of ARS::Simple


__END__

t/00-load.t  view on Meta::CPAN

#!perl -T
use 5.006;
use strict;
use warnings FATAL => 'all';
use Test::More;

plan tests => 1;

BEGIN {
    use_ok( 'ARS::Simple' ) || print "Bail out!\n";
}

diag( "Testing ARS::Simple $ARS::Simple::VERSION, Perl $], $^X" );

t/01-connect.t  view on Meta::CPAN

#!perl -T
# 01-connect.t
use 5.006;
use strict;
use warnings FATAL => 'all';
use ARS::Simple;
use Test::More;

plan tests => 1;

BEGIN
{
    eval {require './t/config.cache'; };
    if ($@)
    {
        plan( skip_all => "Testing configuration was not set, test not possible" );
    }
}

plan( skip_all => "Automated testing") if ($ENV{PERL_MM_USE_DEFAULT} || $ENV{AUTOMATED_TESTING});

diag( "Testing against server: " .  CCACHE::server());

my $ars = ARS::Simple->new({
        server   => CCACHE::server(),
        user     => CCACHE::user(),
        password => CCACHE::password(),
        });

ok(defined($ars), 'connected to Remedy ARSystem');

t/manifest.t  view on Meta::CPAN

#!perl -T
use 5.006;
use strict;
use warnings FATAL => 'all';
use Test::More;

unless ( $ENV{RELEASE_TESTING} ) {
    plan( skip_all => "Author tests not required for installation" );
}

my $min_tcm = 0.9;
eval "use Test::CheckManifest $min_tcm";
plan skip_all => "Test::CheckManifest $min_tcm required" if $@;

ok_manifest();

t/pod-coverage.t  view on Meta::CPAN

#!perl -T
use 5.006;
use strict;
use warnings FATAL => 'all';
use Test::More;

# Ensure a recent version of Test::Pod::Coverage
my $min_tpc = 1.08;
eval "use Test::Pod::Coverage $min_tpc";
plan skip_all => "Test::Pod::Coverage $min_tpc required for testing POD coverage"
    if $@;

# Test::Pod::Coverage doesn't require a minimum Pod::Coverage version,
# but older versions don't recognize some common documentation styles
my $min_pc = 0.18;
eval "use Pod::Coverage $min_pc";
plan skip_all => "Pod::Coverage $min_pc required for testing POD coverage"
    if $@;

all_pod_coverage_ok();

t/pod.t  view on Meta::CPAN

#!perl -T
use 5.006;
use strict;
use warnings FATAL => 'all';
use Test::More;

# Ensure a recent version of Test::Pod
my $min_tp = 1.22;
eval "use Test::Pod $min_tp";
plan skip_all => "Test::Pod $min_tp required for testing POD" if $@;

all_pod_files_ok();



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