ASNMTAP

 view release on metacpan or  search on metacpan

Makefile.PL  view on Meta::CPAN

    [ '/etc/ppp/resolv/ASNMTAP',  'R' ],
    [ '/usr/bin/plog',            'R' ],
    [ '/usr/bin/poff',            'R' ],
    [ '/usr/bin/pon',             'R' ],
   ]
  ],
  [ '*001104', 'SOAP support',        'ASNMTAP::Asnmtap::Plugins::SOAP',        { 'ASNMTAP::Asnmtap::Plugins' => '*0011', 'SOAP::Lite' => '0.710.08', 'WSRF::Lite' => '0.8.2.7', 'DateTime' => '0.37', 'DateTime::Format::Epoch' => '0.10', 'DateTime::For...
  [ '*001105', 'WebTransact support', 'ASNMTAP::Asnmtap::Plugins::WebTransact', { 'ASNMTAP::Asnmtap::Plugins' => '*0011', 'Bundle::LWP' => '1.11', 'CGI' => '3.37', 'Compress::Zlib' => '2.010', 'Crypt::SSLeay' => '0.56', 'Digest::MD5' => '2.36', 'IO::...
  [ '*001106', 'XML support',         'ASNMTAP::Asnmtap::Plugins::XML',         { 'ASNMTAP::Asnmtap::Plugins' => '*0011', 'XML::Parser' => '2.36', 'XML::LibXML' => '1.70', 'XML::Simple' => '2.18' }, 2, [], [] ],
  [ '*001199', 'Testing Templates',   'ASNMTAP::Asnmtap::Plugins::NPTest',      { 'ASNMTAP::Asnmtap::Plugins' => '*0011', 'Cwd' => '3.25', 'Data::Dumper' => '2.121', 'File::Basename' => '2.73', 'IO' => '1.23' }, 1, [], [] ],
  [ '', 'unbless data structure',     'Data::Structure::Util',                  { 'Test::Builder::Tester' => '1.13', 'Test::Pod' => '1.22', 'Clone' =>'0.18', 'File::Find::Rule' => '0.28', 'Data::Structure::Util' => '0.11' }, 4, [], [] ],
  [ '', 'FTP template',               'check_template-ftp.pl',                  { 'Net::FTP' => '2.75' }, 4, [], [] ],
  [ '', 'LDAP template',              'check_template-ldap.pl',                 { 'Convert::ASN1' => '0.19', 'URI::ldap' => '1.11', 'Digest::MD5' => '2.36', 'XML::Parser' => '2.36', 'Net::LDAP' => '0.34' }, 4, [], [] ],
  [ '', 'MySQL template',             'check_MySQL-database-replication.pl',    { 'Bit::Vector' => '6.3', 'Date::Calc' => '5.4', 'Bundle::DBI' => '1.604', 'Bundle::DBD::mysql' => '4.004', 'DBIx::Log4perl' => '0.18', 'Log::Log4perl' => '1.26' }, 4, []...
  [ '', 'SFTP template',              'check_template-sftp.pl',                 { 'Net::SFTP::Foreign' => '1.61' }, 4, [], [] ]
);

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

my %has_module_cache = ();

README  view on Meta::CPAN

- XML::Simple:                   2.14

ASNMTAP::Asnmtap::Plugins::NPTest
- Cwd:                           3.25
- Data::Dumper:                  2.12
- File::Basename:                2.73


HOWTO:

1) How can i unbless a data structure:

use Data::Structure::Util qw(unbless);
unbless($WSListResults);

Dependencies Data::Structure::Util
- Clone
- File::Find::Rule
- Test::Builder::Tester
- Test::Pod


# COPYRIGHT AND LICENCE - - - - - - - - - - - - - - - - - - - - - - - - -

lib/ASNMTAP/Asnmtap.pm  view on Meta::CPAN

  } else {
    use ASNMTAP::PseudoHash;

    $self = do {
      my @array = undef;

      while (my ($k, $v) = splice(@parameters, 0, 2)) {
        $array[$array[0]{$k} = @array] = $v;
      }

      bless(\@array, $classname);
    };
  }

  my %args = @_;
 
  $self->{_programName}        = $args{_programName}        if ( exists $args{_programName} );
  $self->{_programDescription} = $args{_programDescription} if ( exists $args{_programDescription} );
  $self->{_programVersion}     = $args{_programVersion}     if ( exists $args{_programVersion} );
  $self->{_programUsagePrefix} = $args{_programUsagePrefix} if ( exists $args{_programUsagePrefix} );
  $self->{_programHelpPrefix}  = $args{_programHelpPrefix}  if ( exists $args{_programHelpPrefix} );
  $self->{_programUsageSuffix} = $args{_programUsageSuffix} if ( exists $args{_programUsageSuffix} );
  $self->{_programHelpSuffix}  = $args{_programHelpSuffix}  if ( exists $args{_programHelpSuffix} );
  $self->{_programGetOptions}  = $args{_programGetOptions}  if ( exists $args{_programGetOptions} );
  $self->{_debug}              = $args{_debug}              if ( exists $args{_debug} );

  if ( defined $self->{_programVersion} ) {
    $self->{_programVersion} =~ s/^\$Revision: //;
    $self->{_programVersion} =~ s/ \$\s*$//;
  }

  bless ($self, $classname);
  $self->_init(\%args);
  $self->_getOptions();
  return ($self);
}

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

sub _init {
  carp ('ASNMTAP::Asnmtap: _init') if ( $_[0]->{_debug} );

lib/ASNMTAP/Asnmtap/Plugins/Mail.pm  view on Meta::CPAN

  } else {
    use ASNMTAP::PseudoHash;

    $self = do {
      my @array = undef;

      while (my ($k, $v) = splice(@parameters, 0, 2)) {
        $array[$array[0]{$k} = @array] = $v;
      }

      bless(\@array, $classname);
    };
  }

  my %args = @_;

  $self->{_asnmtapInherited}        = $args{_asnmtapInherited}      if ( exists $args{_asnmtapInherited} );

  if ( exists $args{_SMTP} ) {
    $self->{_SMTP}->{smtp}          = $args{_SMTP}->{smtp}          if ( exists $args{_SMTP}->{smtp} );
    $self->{_SMTP}->{port}          = $args{_SMTP}->{port}          if ( exists $args{_SMTP}->{port} );

lib/ASNMTAP/Asnmtap/Plugins/Mail.pm  view on Meta::CPAN

    $self->{_text}->{status}        = $args{_text}->{status}        if ( exists $args{_text}->{status} );
  }

  if ( exists $args{_mail} ) {
    $self->{_mail}->{from}          = $args{_mail}->{from}          if ( exists $args{_mail}->{from} );
    $self->{_mail}->{to}            = $args{_mail}->{to}            if ( exists $args{_mail}->{to} );
    $self->{_mail}->{status}        = $args{_mail}->{status}        if ( exists $args{_mail}->{status} );
    $self->{_mail}->{body}          = $args{_mail}->{body}          if ( exists $args{_mail}->{body} );
  }

  bless ($self, $classname);
  $self->_init();
  return ($self);
}

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

sub _init {
  my $asnmtapInherited = $_[0]->{_asnmtapInherited};
  unless ( defined $asnmtapInherited ) { cluck ( 'ASNMTAP::Asnmtap::Plugins::Mail: asnmtapInherited missing' ); exit $ERRORS{UNKNOWN} }

lib/ASNMTAP/Asnmtap/Plugins/NPTest.pm  view on Meta::CPAN

  closedir( DIR );

  return sort @tests;
}

# All the new object oriented stuff below

sub new { 
	my $type = shift;
	my $self = {};
	return bless $self, $type;
}

# Accessors
sub return_code {
	my $self = shift;
	if (@_) {
		return $self->{return_code} = shift;
	} else {
		return $self->{return_code};
	}

lib/ASNMTAP/Asnmtap/Plugins/WebTransact.pm  view on Meta::CPAN

                            $self->{$accessor};
                          };

      foreach my $acc_pre (qw(get set)) {
        $full_name = $classname .'::'. $acc_pre .'_'. $accessor;
        *{$full_name} = $acc_pre eq 'get' ? sub { my $self = shift @_; $self->{$accessor} } : sub { my $self = shift @_; $self->{$accessor} = shift @_ };
      }
    }
  }

  bless { asnmtapInherited => $asnmtapInherited, urls => $urls_ar, matches => [], returns => {}, ua => undef, newAgent => 1, number_of_images_downloaded => 0, _unknownErrors => 0, _KnownError => undef, _timing_tries => 0 }, $classname;
  # The field urls contains a ref to a list of (hashes) records representing the web transaction.

  # self->_my_match() will update $self->{matches};
  # with the set of matches it finds by matching patterns with memory (ie patterns in paren) from
  # the Exp field against the request response.
  # An array ref to the array containing the matches is stored in the field 'matches'.

  # Qs_var = [ form_name_1 => 0, form_name_2 => 1 ..] will lead to a query_string like
  # form_name_1 = $matches[0] form_name_2 = $matches[1] .. in $self->_make_request() by
  # @matches = $self->matches(); and using 0, 1 etc as indices of @matches.

lib/ASNMTAP/PseudoHash.pm  view on Meta::CPAN

      my ($self, $key, $value) = @_;

      $self = $$$self;
      my $index = ( ( defined $self->[0]{$key} and $self->[0]{$key} >= 1 ) ? $self->[0]{$key} : ( defined $self->[0]{$key} ? _cluck(NO_SUCH_INDEX) : ( $FixedKeys ? _cluck(NO_SUCH_FIELD, $key) : @$self ) ) );
      return $self->[ $index ] = $value;
    }

    # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    sub TIEHASH {
      bless \$Obj => shift;
    }

    # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    sub FIRSTKEY {
      scalar keys %{$${$_[0]}->[0]};
      each %{$${$_[0]}->[0]};
    }

    # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

lib/ASNMTAP/PseudoHash.pod  view on Meta::CPAN

  } else {
    use ASNMTAP::PseudoHash;

    $self = do {
      my @array = undef;

      while (my ($k, $v) = splice(@parameters, 0, 2)) {
        $array[$array[0]{$k} = @array] = $v;
      }

      bless(\@array, $classname);
    };
  }

=head1 DESCRIPTION

Emulates Pseudo-Hash behaviour via overload used by ASNMTAP and ASNMTAP-based applications and plugins.

=head1 AUTHOR

Alex Peeters [alex.peeters@citap.be]



( run in 0.429 second using v1.01-cache-2.11-cpan-de7293f3b23 )