----- Original Message ----- 
From: "Harry Putnam" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, June 29, 2003 11:58 AM
Subject: Re: make CPAN::Shell->i; print to a filehandle


> Mark G <[EMAIL PROTECTED]> writes:
>
> > that would be
> >
> > $pid = open2($wtr, $rdr, 'CPAN::Shell->i');
> >
> > foreach( @module ){
> >     print $wtr "$_\n";
> >     print "shell output: $_\n" while <$rdr>;
> > }
>
> Still not able to get this to fly.  Probably something wrong here:
>
> cat IPC.pl
> #!/usr/local/bin/perl -w
>
> use CPAN;
> use IPC::Open2;
>
> my ($wtr, $wdr, @item, $pid);
>
> $pid = open2($wtr, $rdr, 'CPAN::Shell->i');
>
> foreach(@item){
>   print $wtr "$_\n";
>   print "shell output: $_\n" while <$rdr>;
> }
>
>  ./IPC.pl
> sh: CPAN::Shell-: command not found
>
> With out the single quotes around CPAN::Shell->i:
>
> It runs and kicks out everything on cpan, but doesn't do any of the
> read write stuff.  Closing with this error:
>
> [...]
> 28213 items found
> Can't exec "1": No such file or directory at
> /usr/local/lib/perl5/5.8.0/IPC/Open3.pm line 230.  open2: exec of 1
> failed at ./IPC.pl line 8
>
> For some reason it seems to be using:
>   /usr/local/lib/perl5/5.8.0/IPC/Open3.pm
> Instead of:
> /usr/local/lib/perl5/5.8.0/IPC/Open2.pm
>
> I tried changine over to IPC::Open3
>
> cat IPC.pl
> #!/usr/local/bin/perl -w
>
> use CPAN;
> use IPC::Open3;
>
> my ($wtr, $wdr, $err, @item, $pid);
>
> $pid = open3($wtr, $rdr, $err, 'CPAN::Shell->i');
>
> foreach(@item){
>   print $wtr "$_\n";
>   print "shell output: $_\n" while <$rdr>;
> }
>
> This runs but exits instantly with no error and does nothing
> noticable.

Well I just tryed runing  'CPAN::Shell->i' from the shell, and it failed to
launch it. Can you run  'CPAN::Shell->i' from your systems default shell ??
you can try using ppm instead.

Mark G

>
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to