+libnet 1.22 -- Sun Aug 26 07:13:18 CDT 2007
+
+Bug Fixes
+ * Fix a bug in Net::Cmd that is_utf8 does not exist prior to perl 5.8.1
+
libnet 1.21 -- Sat May 19 08:53:09 CDT 2007
Bug Fixes
}
}
-my $doUTF8 = eval { require utf8 };
+BEGIN {
+ if (!eval { require utf8 }) {
+ *is_utf8 = sub { 0 };
+ }
+ elsif (eval { utf8::is_utf8(undef); 1 }) {
+ *is_utf8 = \&utf8::is_utf8;
+ }
+ elsif (eval { require Encode; Encode::is_utf8(undef); 1 }) {
+ *is_utf8 = \&Encode::is_utf8;
+ }
+ else {
+ *is_utf8 = sub { $_[0] =~ /[^\x00-\xff]/ };
+ }
+}
-$VERSION = "2.28";
+$VERSION = "2.29";
@ISA = qw(Exporter);
@EXPORT = qw(CMD_INFO CMD_OK CMD_MORE CMD_REJECT CMD_ERROR CMD_PENDING);
my $arr = @_ == 1 && ref($_[0]) ? $_[0] : \@_;
my $line = join("", @$arr);
- if ($doUTF8) {
- # encode to individual utf8 bytes if
- # $line is a string (in internal UTF-8)
- utf8::encode($line) if utf8::is_utf8($line);
- }
+ # encode to individual utf8 bytes if
+ # $line is a string (in internal UTF-8)
+ utf8::encode($line) if is_utf8($line);
return 0 unless defined(fileno($cmd));
of the file about to be transferred using the ALLO ftp command. Some storage
systems use this to make intelligent decisions about how to store the file.
The C<SIZE> argument represents the size of the file in bytes. The
-C<RECORD_SIZE> argument indicates a mazimum record or page size for files
+C<RECORD_SIZE> argument indicates a maximum record or page size for files
sent with a record or page structure.
The size of the file will be determined, and sent to the server