Alois Mahdal (@azzgoat) c05b6197e5 Added server-side username to output. | 12 years ago | |
---|---|---|
bin | 12 years ago | |
cgi-bin | 12 years ago | |
lib | 12 years ago | |
.gitignore | 12 years ago | |
COPYING | 12 years ago | |
COPYING.LESSER | 12 years ago | |
README.md | 12 years ago | |
TODO.md | 12 years ago |
My favorite tiny Perl scripts for development and testing.
Collects GET requests with parameters msg, tag and i and logs them into single text file.
name=john;age=32;state=il
test01-012
.. test01-013
to
store the iteration number, you'll be better off with this parameter as
it won't break your ability to use tagsAPI to make usage of htlog.cgi in Perl scripts even easier
use htlogr;
my $logger = htlogr::new('http://192.168.1.1/cgi-bin/htlog.cgi');
# we don't need tag nor iteration number, but it can be useful
my $tag = "synopsis_test";
$logger->log("Commencing synopsis test", $tag);
my $data = {
foo => 1,
bar => "Hello world"
};
foreach my $i (1..1000) {
# log normal messages--with I!
$logger->log("next 10 done!", $tag, $i) unless ($num % 100);
# or a simple one-level data structures
$logger->data(
my_func_returning_hashref($data),
$tag,
$i
);
}
Script to make it easier to start developing your new Perl module under pressure of unit tests written in Test::More and the likes.
Suggested use is to sit on the other monitor, run all .t files around and around and be annoying about the fact that they fail. Then the rule of thumb goes without saying: "no green, no commit".
Script to measure how long mone second takes. For those that know how long
one second takes, it can serve as a snippet for Perl &stamp()
.
Container module for some utility methods for Perl. Probably only dmup()
is interesting—it bears a nice quick and dirty way for dumping Perl
data.
Trivial utility that prints a text file, clears the screen and pauses for 2s over and over.
Designed mainly for use with helper::dmup();
to enable you to see changes
in your dumped data structure continuously, but obviously you can use it for
any text file that will fit your screen.
For improved visual feedack, it will pre-pend the file contents with the file
path and an "animation". Display of the header can be controlled by options,
see --usage
.