Net-Telnet

 view release on metacpan or  search on metacpan

Makefile.PL  view on Meta::CPAN

1
2
3
4
5
6
7
8
9
10
11
12
13
14
## -*- Perl -*-
 
use ExtUtils::MakeMaker qw(WriteMakefile);
 
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

2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
    ('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 )