Skip Menu |

This queue is for tickets about the NetServer-Generic CPAN distribution.

Report information
The Basics
Id: 27224
Status: new
Priority: 0/
Queue: NetServer-Generic

People
Owner: Nobody in particular
Requestors: nick.cpan [...] xlmt.com
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in: 1.03
Fixed in: (no value)



Subject: Error in Docs: Synopsis example code
I'm using NetServer-Generic-1.03 The example callback code provided in the perldoc Synopsis does not run. missing '}' to close while loop missing semicolon at end of multi-line $server_cb =..... statement after '}' So it should read: my $server_cb = sub { my ($s) = shift ; print STDOUT "Echo server: type bye to quit, exit ", "to kill the server.\n\n" ; while (defined ($tmp = <STDIN>)) { return if ($tmp =~ /^bye/i); $s->quit() if ($tmp =~ /^exit/i); print STDOUT "You said:>$tmp\n"; } # <---- was missing this close-bracket entirely }; # <---- was missing semicolon here