ASNMTAP
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
Asnmtap/Plugins/Modem
Asnmtap/Plugins/Nagios
Asnmtap/Plugins/SOAP
Asnmtap/Plugins/WebTransact
Asnmtap/Plugins/XML
);
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
my @prerequisites = (
# [ '<level>', '<feature>', '<installed module>', <dependency hash>, <install by default: 0 = no, 1 = yes, 2 = always, 3 = reserved and 4 = info>, [[<files>, <x|r>], ...] ];
[ '*00', 'Package ASNMTAP::Asnmtap', 'ASNMTAP::Asnmtap', { 'CPAN' => '1.9205', 'CPANPLUS' => '0.84', 'Config::General' => '2.38', 'Config::General::Interpolated' => '2.07', 'Data::Dumper' => '2.121','Dumpvalue' => '1.11', 'Ge...
[
[ 'Changes', 'r' ],
[ 'AUTHORS', 'r' ],
[ 'INSTALL', 'r' ],
[ 'README', 'r' ],
[ 'Asnmtap.cnf', 'R' ],
[ 'log', 'd' ],
[ 'pid', 'd' ],
]
Makefile.PL view on Meta::CPAN
# Maintains a cache of what 3rd party modules you have installed
sub has_module {
my ($module, $version) = @_;
$version ||= '';
return ( ( $version =~ /^\*\d{2,2}(?:\d{2,2}(?:\d{2,2})?)?$/ ) ? 2 : ( $has_module_cache { "$module$version" } ||= eval ( "require $module; Exporter::require_version ( '$module', $version ) if ( $version ); 1" ) ) );
}
# Print a single prerequisite to the screen
sub generate_PREREQ_PM {
my ($feature, $dependency, $modules, $install) = @_;
my $buffer;
my $i = 0;
foreach (keys %$modules) {
my $detected = has_module ( $_, $modules->{$_} );
$buffer .= sprintf ( "%-24s [%s] %-32s %-8s\n", ( $i++ ? '' : $feature), ($detected >= 2 ? '+' : ( $detected ? '*' : ' ') ), $_ . ( $modules->{ $_ } and $modules->{ $_ } !~ /^\*\d{2,2}(?:\d{2,2}(?:\d{2,2})?)?$/ ? " (v$modules->{$_})" : '' ), ( $i...
}
return $buffer;
}
# Print the entire prerequisites table
sub generate_PREREQ_PM_table {
my $buffer = sprintf ( "%-24s %-36s %-8s\n", 'Feature', 'Prerequisites', 'Install?' );
$buffer .= sprintf ( "%s %s %s\n","-" x 24,"-" x 36,"-" x 8 );
foreach my $prerequisites ( @prerequisites ) { $buffer .= generate_PREREQ_PM ( @$prerequisites[1..4] ); }
Makefile.PL view on Meta::CPAN
my $proceed = 0;
do {
print "\n". generate_PREREQ_PM_table() ."\n";
$proceed = ( $prompt ? ExtUtils::MakeMaker::prompt( "Do you want to proceed with this configuration?" => 'yes' ) =~ /^\s*y/i : 1 );
print "\nActivate test:\n" if ($proceed);
%PREREQ_PM = ();
foreach my $prerequisite ( @prerequisites ) {
my ($level, $feature, $dependency, $modules, $default) = @{$prerequisite}[0..4];
next unless ( $dependency ne '' );
unless ( $proceed || $default >= 2 ) {
$default = ( ( ExtUtils::MakeMaker::prompt( "Do you plan to use ${feature}?" => ( $default ? 'yes' : 'no' ) ) =~ /^\s*(y)/i ) ? 1 : 0 );
@{$prerequisite}[4] = $default;
}
update_prerequisites_table( $level, $default );
if ( $proceed and ( $default == 1 || $default == 2 ) ) {
if ( $dependency =~ /^ASNMTAP::Asnmtap::/ ) {
my $t = uc($');
$t =~ s/::/_/g;
my $enabled = 't/'. $t .'_ENABLED';
Makefile.PL view on Meta::CPAN
}
}
} while (! $proceed);
print "\n";
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
if ( $ASNMTAP_PLUGINS or $ASNMTAP_APPLICATIONS ) {
foreach my $prerequisite ( @prerequisites ) {
my ($feature, $default, $files) = ( @{$prerequisite}[1], @{$prerequisite}[4..5] );
if ( $default == 1 || $default == 2 ) {
if ( defined $files ) {
foreach ( @$files ) {
my $file = @$_[0];
my $mode = @$_[1];
my @files = glob($file);
foreach my $file (@files) {
my $destination = ( $file =~ /^\// ? $file : $ASNMTAP_PATH .'/'. $file );
applications/htmlroot/overlib_followscroll.js view on Meta::CPAN
var k=i,v;
if (k < ar.length) {
if (ar[k]==FOLLOWSCROLL) { eval(pf +'followscroll=('+pf+'followscroll==0) ? 1 : 0'); return k; }
if (ar[k]==FOLLOWSCROLLREFRESH) { eval(pf+'followscrollrefresh='+ar[++k]); return k; }
}
return -1;
}
// Function to support scroll feature (overloads default)
function scroll_placeLayer() {
var placeX, placeY, widthFix = 0;
// HORIZONTAL PLACEMENT
if (o3_frame.innerWidth) {
widthFix=Math.ceil(1.2*(o3_frame.outerWidth - o3_frame.innerWidth));
widthFix = (widthFix > 50) ? 20 : widthFix;
iwidth=o3_frame.innerWidth;
} else if (eval('o3_frame.'+docRoot)&&eval("typeof o3_frame."+docRoot+".clientWidth=='number'")&&eval('o3_frame.'+docRoot+'.clientWidth'))
iwidth=eval('o3_frame.'+docRoot+'.clientWidth');
applications/htmlroot/overlib_shadow.js view on Meta::CPAN
if (ar[k]==SHADOWOPACITY) {v=ar[++k]; eval(pf+'shadowopacity='+(olOp ? 0 : v)); return k; }
if (ar[k]==SHADOWIMAGE) { eval(pf+'shadowimage="'+ar[++k]+'"'); return k; }
if (ar[k]==SHADOWX) { eval(pf+'shadowx='+ar[++k]); return k; }
if (ar[k]==SHADOWY) { eval(pf+'shadowy='+ar[++k]); return k; }
}
return -1;
}
// Function for MOUSEOUT/MOUSEOFF feature with shadow
function shadow_cursorOff() {
var left= parseInt(over.style.left);
var top=parseInt(over.style.top);
var right=left+(o3_shadow ? o3_width : over.offsetWidth);
var bottom=top+(o3_shadow ? o3_aboveheight : over.offsetHeight);
if (o3_x < left || o3_x > right || o3_y < top || o3_y > bottom) return true;
return false;
}
lib/ASNMTAP/Asnmtap/Plugins/WebTransact.pm view on Meta::CPAN
Msg_Fault => { is_ref => FALSE, type => '' },
Timeout => { is_ref => FALSE, type => undef },
Perfdata_Label => { is_ref => FALSE, type => undef }
};
my (%returns, %downloaded, $ua);
keys %downloaded = 128;
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
sub _handleHttpdErrors { print "<hr><h1>ASNMTAP::Asnmtap::Plugins::WebTransact It's not a bug, it's a feature!</h1><p>Error: $_[0]</p><hr>"; }
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
set_message ( \&_handleHttpdErrors );
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
sub _error_message { $_[0] =~ s/\n/ /g; $_[0]; }
# = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
( run in 0.273 second using v1.01-cache-2.11-cpan-4d50c553e7e )