Logmonster 3.02 perl error

Started by LordOfLA, July 15, 2007, 12:50:07 AM

Previous topic - Next topic

LordOfLA

Hey!

I've had cronolog logging for a few days now and came to run logmonster to sort things out.

However I ran into this:

The 'lines' parameter ( <snip> ) to Apache::Logmonster::Utility::file_write was a 'scalar', which is not one of the allowed types: arrayref
at /usr/local/lib/perl5/site_perl/5.8.8/Apache/Logmonster/Utility.pm line 1009
        Apache::Logmonster::Utility::file_write('undef', 'file', '/etc/awstats/awstats.conf', 'debug', 0, 'fatal', 0, 'lines', '# installed by logmonster\x{a}LogFile="gzip -d </var/log/apache/%...', ...) called at /usr/local/lib/perl5/site_perl/5.8.8/Apache/Logmonster.pm line 1088
        Apache::Logmonster::install_default_awstats_conf('Apache::Logmonster=HASH(0x856d8c4)') called at /usr/local/lib/perl5/site_perl/5.8.8/Apache/Logmonster.pm line 56
        Apache::Logmonster::check_awstats_file('Apache::Logmonster=HASH(0x856d8c4)', 'domain.com', '/home/username/public_html/domain.com/stats') called at /usr/local/lib/perl5/site_perl/5.8.8/Apache/Logmonster.pm line 484
        Apache::Logmonster::feed_the_machine('Apache::Logmonster=HASH(0x856d8c4)', 'HASH(0x8538cdc)') called at /usr/local/sbin/logmonster.pl line 105
[root@raptor /etc/awstats]#


I changed Utility.pm to check for a SCALAR type but Perl then said I can't use that as an arrayref.

How would I fix this?

OS FreeBSD 6.2. Let me know if you need further details.

Thanks

matt

unforunately, you snipped out the most relevant portion of the error message that told what passed the invalid call to file_write. It's the caller that needs to be fixed, not the callee (as you attempted to do).