( ESNUG 261 Item 4 ) -------------------------------------------- [5/22/97]

Subject: (ESNUG 259 #1)  dc_perl: Enhancing dc_shell Using a Perl Wrapper

> John, as you requested, here's a copy of my dc_perl paper and the actual
> script itself for publication on ESNUG.  As I said at SNUG'97, I'd like
> to see what users can do with this; break it!, change it!, make it better
> and share how you improve it with the rest of us!


From: Mark Super <msuper@cisco.com>

John:

The dc_perl script is a very interesting piece of work which will add
to the capability of dc_shell.

However I want to pass along a problem that was found.  The dc_perl
script ran well under SunOS but the first attempt to run the script
under Solaris did not.  Also I believe I was able to determine the 
cause of the problem and a workaround.

The dc_perl script will need to use a SunOS version of Perl and not a
Solaris version.  The script requires a SunOS version because of a bug
in the chat2.pl program.  The chat2.pl program was implemented with the
Perl select function which is based on a select(2) system call.
However the select(2) system call apparently exists in SunOS and not in
Solaris.  Without the select(2) system call the dc_perl script will not
block or wait for the array of handles that are ready for I/O.  But if
the dc_perl script is run with a SunOS version of Perl then it will
work under both SunOS and Solaris.

Also there is a type error in the sub _get_line.

        Old:     Outbuffer = $2
        New:    $OutBuffer = $2

  - Mark Super
    Cisco Systems

       ----    ----    ----    ----    ----    ----    ----

From: hofflee@hsd.utc.com ( Leland Hoff )

John - 
	I read ESNUG 259 #1 and decided that this perl wrapper was something
that I wanted to use here.  So I dutifully grabbed the latest perl 5.003
from the 'net and compiled it on my machine.

	After all this I stripped the ESNUG filler down to just the dc_perl 
script and ran it.  It gagged with a "Can't modify constant item... " error
after some digging I found a typo in the dc_perl script.  It was at line 399
in my stripped file. In the subroutine _get_line + 13 lines  

   line 13 looks like this:    OutBuffer = $2 ; rest to OutBuffer
   but it should be:          $OutBuffer = $2 ; rest to OutBuffer

This got rid of the error.  I hope this keeps anyone else from having
this problem.
 
  - Leland Hoff
    Hamilton Standard Division of United Technologies



 Sign up for the DeepChip newsletter.
Email
 Read what EDA tool users really think.


Feedback About Wiretaps ESNUGs SIGN UP! Downloads Trip Reports Advertise

"Relax. This is a discussion. Anything said here is just one engineer's opinion. Email in your dissenting letter and it'll be published, too."
This Web Site Is Modified Every 2-3 Days
Copyright 1991-2024 John Cooley.  All Rights Reserved.
| Contact John Cooley | Webmaster | Legal | Feedback Form |

   !!!     "It's not a BUG,
  /o o\  /  it's a FEATURE!"
 (  >  )
  \ - / 
  _] [_     (jcooley 1991)