Thread Projekt Term::ReadLine::Tiny
(23 answers)
Opened by Kuerbis at 2014-07-13 16:40
Hallo!
Das folgende scheint mir nicht ganz korrekt zu sein (Code): Code (perl): (dl
)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 sub new { my $class = shift; my ( $name ) = @_; my $self = bless { name => $name, handle_in => \*STDIN, handle_out => \*STDOUT, }, $class; ... } sub __print_readline { my ( $self, ... ) = @_; ... print $string; ... } Sollte ich das eher so umändern: Code (perl): (dl
)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 sub new { my $class = shift; my ( $name ) = @_; my $self = bless { name => $name, handle_in => \*STDIN, handle_out => \*STDOUT, }, $class; ... } sub __print_readline { my ( $self, ... ) = @_; ... print { $self->{handle_out} } $string; ... } oder so? Code (perl): (dl
)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 sub new { my $class = shift; my ( $name ) = @_; my $self = bless { name => $name, handle_in => \*STDIN, handle_out => select, }, $class; ... } sub __print_readline { my ( $self, ... ) = @_; ... print $string; ... } |