Net-Telnet
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
1234567891011121314## -*- Perl -*-
WriteMakefile(
NAME
=>
"Net::Telnet"
,
DISTNAME
=>
"Net-Telnet"
,
VERSION_FROM
=>
"lib/Net/Telnet.pm"
,
dist
=> {
COMPRESS
=>
"gzip"
,
SUFFIX
=>
"gz"
},
($] ge
'5.005'
?
(
ABSTRACT
=>
"Interact with TELNET port or other TCP ports"
,
AUTHOR
=>
"Jay Rogers <jay\@rgrs.com>"
) : ()),
($] ge
'5.010'
?
(
LICENSE
=>
"perl"
) : ()),
);
lib/Net/Telnet.pm view on Meta::CPAN
231323142315231623172318231923202321232223232324232523262327232823292330233123322333
(
'if (($pos = index $s->{buf}, '
, ') > -1) {
$len
=
', '
;
$prematch
=
substr
$s
->{buf}, 0,
$pos
;
$match
=
substr
$s
->{buf},
$pos
,
$len
;
substr
(
$s
->{buf}, 0,
$pos
+
$len
) =
""
;
last
;
}');
## Code template used to build pattern match conditional.
## Values between array elements must be supplied later.
if
($] ge
'5.006'
) {
# perl5.6.0+ has performance alternative to $` and $&
@match_cond
=
(
'if ($s->{buf} =~ '
, ') {
$prematch
=
substr
(
$s
->{buf}, 0, $-[0]);
$match
=
substr
(
$s
->{buf}, $-[0], $+[0] - $-[0]);
substr
(
$s
->{buf}, 0,
length
(
$prematch
) +
length
(
$match
)) =
""
;
last
;
}');
}
else
{
@match_cond
=
( run in 0.292 second using v1.01-cache-2.11-cpan-fb7fbe3ddfd )