Paul brings up a good point.  You can do something like this:

package OurPackage;

BEGIN {
  my $filename = (caller(2))[1];
  # now, open $filename and make sure it only uses what you want
  # and how you want it used.
}

######################## in their file
use strict;
use OurPackage; <-- BEGIN is executed here

Good Luck!
Tanton

-----Original Message-----
From: Paul Johnson
To: Edwin Günthner
Cc: [EMAIL PROTECTED]
Sent: 8/23/2001 8:33 AM
Subject: Re: Using the B module?

On Thu, Aug 23, 2001 at 03:22:54PM +0200, Edwin Günthner wrote:

> maybe someone can tell me where I can find
> some SIMPLY examples/tutorials of how to use the B package - 

Hardly for beginners, but you probably want to take a look at B::Utils.
As far as tutorials are concerned, I think you might be out of luck.

> for example it would be really nice to see code that 
> reads a perl script and then walks over the corresponding AST
> and prints out all the nodes of the AST.

I'd suggest looking at something like B::Deparse or B::Concise.

You might be better off simply parsing with Perl.

-- 
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net

-- 
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