home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / lang / perl / 6970 < prev    next >
Encoding:
Text File  |  1992-11-14  |  2.6 KB  |  82 lines

  1. Newsgroups: comp.lang.perl
  2. Path: sparky!uunet!mcsun!chsun!bernina!neptune!weingart
  3. From: weingart@inf.ethz.ch (Tobias Weingartner)
  4. Subject: Remote Perl
  5. Message-ID: <1992Nov13.143450.16050@neptune.inf.ethz.ch>
  6. Followup-To: comp.lang.perl
  7. Keywords: remote, in.perld
  8. Sender: news@neptune.inf.ethz.ch (Mr News)
  9. Nntp-Posting-Host: tau.inf.ethz.ch
  10. Reply-To: weingart@inf.ethz.ch
  11. Organization: ETH - Switzerland
  12. Date: Fri, 13 Nov 1992 14:34:50 GMT
  13. Lines: 67
  14.  
  15.  
  16. Hello.
  17.  
  18. Perl is great, Perl is cool, but remote it's just no tool...
  19.  
  20. Well, something like that anyways.  I have run into a small
  21. problem.  When my perl scripts want to execute some 'thing'
  22. (make that a perl subroutine) on another machine, things are
  23. not very rosy.  Frist of all, the rsh method leaves many
  24. things to be desired, security not withstanding.
  25.  
  26. Going on my usual long trip home, I was thinking to myself.
  27. Why not use RPC?  Well, why not?  Of course, after thinking
  28. about it at length, and drawing out some pictures, I found
  29. that this is quite unuseable.
  30.  
  31. Here is how far I have gotten:
  32.  
  33. Make another subroutine in perl:
  34.  
  35. remote ;
  36. remote EXPR ;
  37. remote( EXPR );
  38.  
  39. Where EXPR would be ($machine, $subroutine, @args).  Of course,
  40. remote would return whatever $subroutine @ $machine happened to
  41. return.
  42.  
  43. First problem.  Which *&^@#$* script would the RPC routine
  44. execute?  Well, I was hashing with this for a while, until I
  45. thought of:
  46.  
  47. Why not make the in.perld (or whatever) require ~/.perldrc,
  48. and the do eval "\&$subroutine(\@args)";?
  49.  
  50. Each user could then have their own ~/.perldrc, which could
  51. require needed files, do things, etc...
  52.  
  53.  
  54. While we are on the topic, how about a gethostname call?
  55. I really hate to put:
  56.  
  57. chop($host = `hostname`);
  58.  
  59. into every script that I write.
  60.  
  61.  
  62. Well, enough talk.  If anyone is interested in this, tell
  63. me, and I'll see what I can do in the way of source code.
  64.  
  65. --Toby.
  66.  
  67. -- 
  68.  
  69. ***************************************************************
  70. * Tobias Weingartner  * Not every man is willing to die...    *                
  71. * c/o Bruno Opprecht  * Some have to be PUSHED out the window *
  72. * Oberdierikoner st.7 * ------------------------------------- *                
  73. * 6030 Ebikon Luzern  *      ...This space for rent...        *
  74. * SWITZERLAND         *      ...This space for rent...        *                
  75. ***************************************************************
  76. * +41'041'33'25'40    * ..Midnight the fading, blue Wizrd..   *
  77. ***************************************************************
  78. SYSTEM-F-ANARCHISM, the operating system has been overthrown                  
  79.  
  80. PGP2.0 Public Key available at 'finger weingart@tau.inf.ethz.ch'
  81.  
  82.