Skip Menu |

This queue is for tickets about the Chatbot-Alpha CPAN distribution.

Report information
The Basics
Id: 16274
Status: new
Priority: 0/
Queue: Chatbot-Alpha

People
Owner: Nobody in particular
Requestors: evilsporkman [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 2.02
Fixed in: (no value)



Subject: Doesn't install correctly - fails tests
Chatbot::Alpha doesn't install correctly and fails in the testing stage. I am using Perl 5.8.7 on amd64 (Debian testing), but I have a Windows-using friend who has experienced the same problem, so I don't think it's arch-dependent. Output after trying to install with the CPAN shell: creating: Chatbot-Alpha-2.02/lib/Chatbot/Alpha/ inflating: Chatbot-Alpha-2.02/lib/Chatbot/Alpha/Sort.pm inflating: Chatbot-Alpha-2.02/lib/Chatbot/Alpha/Syntax.pm inflating: Chatbot-Alpha-2.02/lib/Chatbot/Alpha/Tutorial.pm inflating: Chatbot-Alpha-2.02/Makefile.PL inflating: Chatbot-Alpha-2.02/MANIFEST inflating: Chatbot-Alpha-2.02/README creating: Chatbot-Alpha-2.02/t/ inflating: Chatbot-Alpha-2.02/t/Chatbot-Alpha.t inflating: Chatbot-Alpha-2.02/test.pl inflating: Chatbot-Alpha-2.02/testreplies.txt Removing previously used /home/scott/.cpan/build/Chatbot-Alpha-2.02 CPAN.pm: Going to build K/KI/KIRSLE/Chatbot-Alpha-2.02.zip Checking if your kit is complete... Looks good Writing Makefile for Chatbot::Alpha cp lib/Chatbot/Alpha.pm blib/lib/Chatbot/Alpha.pm cp lib/Chatbot/Alpha/Syntax.pm blib/lib/Chatbot/Alpha/Syntax.pm cp lib/Chatbot/Alpha/Tutorial.pm blib/lib/Chatbot/Alpha/Tutorial.pm cp lib/Chatbot/Alpha/Sort.pm blib/lib/Chatbot/Alpha/Sort.pm Manifying blib/man3/Chatbot::Alpha::Syntax.3pm Manifying blib/man3/Chatbot::Alpha.3pm Manifying blib/man3/Chatbot::Alpha::Sort.3pm Manifying blib/man3/Chatbot::Alpha::Tutorial.3pm /usr/bin/make -- OK Running make test PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/Chatbot-Alpha....ok All tests successful. Files=1, Tests=1, 0 wallclock secs ( 0.07 cusr + 0.01 csys = 0.08 CPU) PERL_DL_NONLAZY=1 /usr/bin/perl "-Iblib/lib" "-Iblib/arch" test.pl Chatbot::Alpha version 2.02 Alpha::Debug // loadFile called for file: ./testreplies.txt Use of uninitialized value in substitution (s///) at lib/Chatbot/Alpha/Syntax.pm line 98. Use of uninitialized value in substitution (s///) at lib/Chatbot/Alpha/Syntax.pm line 99. Use of uninitialized value in length at lib/Chatbot/Alpha/Syntax.pm line 101. +TRIGGERS must be lowercase alphanumeric while in 'strict' syntax at ./testreplies.txt line 4; at lib/Chatbot/Alpha/Syntax.pm line 136. make: *** [test_dynamic] Error 9 /usr/bin/make test -- NOT OK Running make install make test had returned bad status, won't install without force
From: Scott Wolchok
The attached patch for Syntax.pm will allow users to install the plugin correctly, though you should really fix test.pl to be a pure automated test instead of dropping users into an interactive session with the bot. (I'm sure there are lots of guides on this if you google.) There was a problem with reading DOS format text files on Linux or Perl distributions that expected LF, not CRLF, at the ends of lines. (I am the same person who reported the bug.) [guest - Sat Dec 3 20:07:07 2005]: Show quoted text
> Chatbot::Alpha doesn't install correctly and fails in the testing > stage. I am using Perl 5.8.7 on amd64 (Debian testing), but I have > a Windows-using friend who has experienced the same problem, so I > don't think it's arch-dependent. > > Output after trying to install with the CPAN shell: > creating: Chatbot-Alpha-2.02/lib/Chatbot/Alpha/ > inflating: Chatbot-Alpha-2.02/lib/Chatbot/Alpha/Sort.pm > inflating: Chatbot-Alpha-2.02/lib/Chatbot/Alpha/Syntax.pm > inflating: Chatbot-Alpha-2.02/lib/Chatbot/Alpha/Tutorial.pm > inflating: Chatbot-Alpha-2.02/Makefile.PL > inflating: Chatbot-Alpha-2.02/MANIFEST > inflating: Chatbot-Alpha-2.02/README > creating: Chatbot-Alpha-2.02/t/ > inflating: Chatbot-Alpha-2.02/t/Chatbot-Alpha.t > inflating: Chatbot-Alpha-2.02/test.pl > inflating: Chatbot-Alpha-2.02/testreplies.txt > Removing previously used /home/scott/.cpan/build/Chatbot-Alpha-2.02 > > CPAN.pm: Going to build K/KI/KIRSLE/Chatbot-Alpha-2.02.zip > > Checking if your kit is complete... > Looks good > Writing Makefile for Chatbot::Alpha > cp lib/Chatbot/Alpha.pm blib/lib/Chatbot/Alpha.pm > cp lib/Chatbot/Alpha/Syntax.pm blib/lib/Chatbot/Alpha/Syntax.pm > cp lib/Chatbot/Alpha/Tutorial.pm blib/lib/Chatbot/Alpha/Tutorial.pm > cp lib/Chatbot/Alpha/Sort.pm blib/lib/Chatbot/Alpha/Sort.pm > Manifying blib/man3/Chatbot::Alpha::Syntax.3pm > Manifying blib/man3/Chatbot::Alpha.3pm > Manifying blib/man3/Chatbot::Alpha::Sort.3pm > Manifying blib/man3/Chatbot::Alpha::Tutorial.3pm > /usr/bin/make -- OK > Running make test > PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" > "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t > t/Chatbot-Alpha....ok > All tests successful. > Files=1, Tests=1, 0 wallclock secs ( 0.07 cusr + 0.01 csys = 0.08 > CPU) > PERL_DL_NONLAZY=1 /usr/bin/perl "-Iblib/lib" "-Iblib/arch" test.pl > Chatbot::Alpha version 2.02 > > Alpha::Debug // loadFile called for file: ./testreplies.txt > Use of uninitialized value in substitution (s///) at > lib/Chatbot/Alpha/Syntax.pm line 98. > Use of uninitialized value in substitution (s///) at > lib/Chatbot/Alpha/Syntax.pm line 99. > Use of uninitialized value in length at lib/Chatbot/Alpha/Syntax.pm > line 101. > +TRIGGERS must be lowercase alphanumeric while in 'strict' syntax at > ./testreplies.txt line 4; at lib/Chatbot/Alpha/Syntax.pm line 136. > make: *** [test_dynamic] Error 9 > /usr/bin/make test -- NOT OK > Running make install > make test had returned bad status, won't install without force >
*** Syntax.pm.bak 2005-12-03 20:50:10.000000000 -0500 --- Syntax.pm 2005-12-03 21:14:25.000000000 -0500 *************** *** 81,104 **** open (FILE, $file) or return 0; my @data = <FILE>; close (FILE); chomp @data; # Go through each line. my $num = 0; foreach my $line (@data) { $num++; ! next unless $line; next if $line =~ /^\//; $line =~ s/^\s+//g; $line =~ s/^\t+//g; $line =~ s/^\s//g; $line =~ s/^\t//g; - chomp $line; ! my $cmd = substr($line, 0, 1); #1st char ! my $data = substr($line, 1); #remainder ! next unless $cmd; # Denied/Not allowed? if ($self->{denytype} ne 'allow_all') { --- 81,112 ---- open (FILE, $file) or return 0; my @data = <FILE>; close (FILE); + + #Handle dos text files on Mac and Unix + if($/ ne "\r\n") + { + local $/ = "\r\n"; + chomp @data; + } + chomp @data; # Go through each line. my $num = 0; foreach my $line (@data) { $num++; ! next if length $line == 0; next if $line =~ /^\//; $line =~ s/^\s+//g; $line =~ s/^\t+//g; $line =~ s/^\s//g; $line =~ s/^\t//g; ! my ($cmd,$data) = split(//, $line, 2); ! $data =~ s/^\s+//g; ! $data =~ s/^\s//g; ! next unless length $cmd > 0; # Denied/Not allowed? if ($self->{denytype} ne 'allow_all') {