# Author: Stu MacKenzie package rss_hit_counter; # -- Configuration -- # # Name of Hit-Counter File # (this file resides in your plugins' state directory; # to view the number of hits, open the file "by hand" # and read it in a text editor.) my $file_name = 'rss_hits'; # # ------------------- sub start { return ($blosxom::flavour eq 'rss' ? 1 : 0); } sub last { my $count; open HITS, "< $blosxom::plugin_state_dir/$file_name" and chomp($count = ) and close HITS; $count ||= 0; $count++; open HITS, "> $blosxom::plugin_state_dir/$file_name" and print HITS $count and close HITS; 1; } 1; __END__