Skip to content

Commit dcb96ac

Browse files
committed
fixup the nonsense I just committed.
perleval was a bad idea. There are probably safer ways to accomplish this. Fixed the enable prompts.
1 parent efd9116 commit dcb96ac

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

lib/App/Tel.pm

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ sub profile {
411411
$profile->{logoutcmd} ||= "logout";
412412
$profile->{prompt} ||= '#';
413413
# handle prompts in foreign languages or other things we didn't think of
414-
$profile->{username_prompt} ||= qr/[Uu]ser[Nn]ame:|[Ll]ogin:/;
414+
$profile->{username_prompt} ||= qr/[Uu]ser[Nn]ame:|[Ll]ogin( Name)?:/;
415415
$profile->{password_prompt} ||= qr/[Pp]ass[Ww]ord/;
416416

417417
$self->{'profile'}=$profile;
@@ -514,7 +514,7 @@ sub enable {
514514
my $profile = $self->profile;
515515

516516
if ($profile->{enablecmd}) {
517-
$profile->{ena_username_prompt} ||= qr/[Uu]ser[Nn]ame:|[Ll]ogin:/;
517+
$profile->{ena_username_prompt} ||= qr/[Uu]ser[Nn]ame:|[Ll]ogin( Name)?:/;
518518
$profile->{ena_password_prompt} ||= qr/[Pp]ass[Ww]ord/;
519519
$profile->{ena_regular_prompt} ||= '>';
520520
my $enable = $profile->{enable} ? $profile->{enable} : $profile->{password};
@@ -623,13 +623,6 @@ sub login {
623623
push @dynamic, [ qr/$rtr->{prompt}/, sub { $self->connected(CONN_PROMPT); last METHOD; } ];
624624
}
625625

626-
<<<<<<< HEAD
627-
=======
628-
# handle prompts in foreign languages or other things we didn't think of
629-
$rtr->{username_prompt} ||= qr/[Uu]ser[Nn]ame:|[Ll]ogin( Name)?:/;
630-
$rtr->{password_prompt} ||= qr/[Pp]ass[Ww]ord/;
631-
>>>>>>> 0b1efff1ae6bec75673e0bf7ce5cac9f322c800f
632-
633626
# used to keep track of if we have run the hostsearched routine.
634627
my $hostsearched = 0;
635628

@@ -728,11 +721,6 @@ sub run_commands {
728721
my $opts = $self->{opts};
729722

730723
CMD: foreach my $arg (@_) {
731-
if ($arg =~ s/^%%perleval:(.*)/) {
732-
warn "Running \"$1\" locally from %%perleval statement.\n";
733-
eval "$1";
734-
next CMD;
735-
}
736724
$arg =~ s/\\r/\r/g; # fix for reload\ry. I believe 'perldoc quotemeta' explains why this happens
737725
chomp($arg);
738726
$self->send("$arg\r");

0 commit comments

Comments
 (0)