You've never looked at the source code of a CPAN module before? Get thee hence to /usr/local/lib/perl5/site_perl/5.8.0/ and read, man!
More, usefully, you could do the following:
- Download the tarball
- Unpack it into the distros directory under your home directory
- Browse the source (it's in the lib/ directory)
Yeah, Expect uses IO::Pty and IO::Tty. IO::Pty uses IO::Tty. It looks like they're all PurePerl and that the non-core dependencies stop there.
As for putting them into your script ... literally cut'n'paste the entire .pm below your source code. Something like:
#!/usr/local/bin/perl
use strict;
$|++;
# My code here
# Do not put any use statements!! You've already "used" the modules
package Expect;
# blahblahblah
package IO::Tty
# blahblahblah
1;
Note: This will bloat the size of your script to about 10k lines. Hope you're paid by the KB! :-)
Another option would be to bundle Expect and IO-Tty in with your code as a distribution to be installed. Just install those modules in the same directory as your script(s). *shrugs*
------
We are the carpenters and bricklayers of the Information Age.
Then there are Damian modules.... *sigh* ... that's not about being less-lazy -- that's about being on some really good drugs -- you know, there is no spoon. - flyingmoose
I shouldn't have to say this, but any code, unless otherwise stated, is untested
|