I decided to use File::Tail.
It has several different parameters and it allows me to keep using a debugging mode I have which lets me test new patterns by reading in the whole file if I want to.
(And reversing the IP's blocked if it is screwed up.)
Luckily I never make mistakes :(
I like to...
Just the Apache error and access logs. No need to scan anything but the latest entries as they come off.
Your idea seems like a good one, I will try it.
I thought I might get a better answer by asking here :)
I have a small program that scans Apache log files for certain "evil" patterns and then blocks those IP addresses from server (not just Apache).
But as these log files grow and grow, the CPU percentage keeps going up.
When I restart Apache after clearing log files, problem goes away, until size...
I am trying to bring LaTeX::Encode into a port of OpenBSD.
But OpenBSD has a version of TAP::Harness in base, version 3.23, which has the method _construct
But there is also a package TAP::Parser that has TAP::Harness, version 0.54, which does not have the _construct method.
The test suite for...
1. provide a fixed width for the select box
I can't do that one, since some of the critical information shows up at the very end.
Seeing:
blahblah
blahblah
blahblah
instead of:
blahblah1
blahblah2
blahblah3
Hmm, but I might be able to do a < style="" > on the fly since I will have the actual...
I have made this work now.
But I don't like the way that the width of the subsection fields jumps after selecting the category.
I want to stabilize this width, but not allow anything but 'All' in the subsection field unless a category is selected first.
I do not want to visually pre-populate...
Yes, that's a better idea. The JavaScript is very simple. A value chosen in one select limits second select to possible values in the other one.
There are three (or more or less) groups of two coordinated selects.
Makes selecting the second value very user friendly
Ugh,
yes JavaScript is a requirement.
I hadn't thought of that.
I will look at those modules. Didn't even know about them.
I could possibly even use those for another script I have that hangs up on a site that requires JavaScript
I want to write tests for my application that views (with searches), inserts and updates a PostgreSQL database. I need to test the web side to see if inserts and updates chain up and down through the tables. I also need to test the database side to see if those changes actually reflect web side...
The one of the other threads was perfect advice.
I have got the first function down to a small array and it works fine.
function setupEventsC(evnt) {
var opts = document.getElementById("someForm").class_selected.options;
var subclass_selected =...
I am generating two select lists from perl.
One shows a class drop down list.
The second one shows a subclass drop down list.
To make life easier, this makes only subclasses that are in a class show up after selecting a class.
Works good. I just rewrote the perl subroutine that generates this...
OK.
Basically, this app runs on a remote server with web access.
It is mod_perl, perl dbi to PostgreSQL which also has stored procedures.
I am trying to improve readability and maintainability.
I have eliminated a lot of silly loops and tests, moving that stuff, after improvement, from the...
I already have the available commands ordered in the most likely order they are to be called.
I will change to this:
if ($command~~@available_commands) {
$dbh->{AutoCommit} = 0;
my $sub = \&{"$command"};
&$sub( $r, $dbh, $q, $database, $program, $lang );
$dbh->commit()...
I am trying to accomplish two things, speed and readability.
I have moved from an if elsif list of options to this:
# earlier:
my @available_commands # In modules
= qw(ViewRecords
InsertRecordGroupForm
UpdateRecordForm
InsertRecordGroup
UpdateRecord...
Thanks, that looks good.
I picked up the book Perl Best Practices, which has inspired me to rewrite a lot of the junk that was in my code.
There were a lot of inefficient SQL tests I had that I have now simplified without loops or extra variables.
This change is to make the test for valid...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.