How can i pass an object like $t from my .pl to .pm file
--===============1317425272==
Content-Type: multipart/alternative; boundary="0-63463667-1173158973=:67816"
Content-Transfer-Encoding: 7bit
--0-63463667-1173158973=:67816
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Hello all ...
I have created a Net::Telnet object (say $t) in my script ... say a.pl =
.... but since the code for "a.pl" is increasing; i decided to created "mo=
dules" eg. host.pm.
now i want to call this Telnet-object $t in host.pm ... how do i do tha=
t??
How can i pass an object like $t from my .pl to .pm file???
Any pointers are really appreciated.
Ukh
---------------------------------
Don't be flakey. Get Yahoo! Mail for Mobile and
always stay connected to friends.
--0-63463667-1173158973=:67816
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
<div>Hello all ... </div> <div> </div> <div>I have created a Net::=
Telnet object (say $t) in my script ... say a.pl ... but since the code f=
or "a.pl" is increasing; i decided to created "modules" eg. host.pm.</div=
> <div> </div> <div>now i want to call this Telnet-object $t in ho=
st.pm ... how do i do that??</div> <div> </div> <div>How can i pas=
s an object like $t from my .pl to .pm file???</div> <div>Any point=
ers are really appreciated.</div> <div> </div> <div>Ukh</div><p>=
32;
<hr size=3D1>Don't be flakey. <a href=3D"http://us.rd.yahoo.com/evt=3D439=
09/*http://mobile.yahoo.com/mail">Get Yahoo! Mail for Mobile</a> and <br>=
<a href=3D"http://us.rd.yahoo.com/evt=3D43909/*http://mobile.yahoo.com/ma=
il">always stay connected</a> to friends.
--0-63463667-1173158973=:67816--
--===============1317425272==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
ActivePerl mailing list
ActivePerl [at] listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
--===============1317425272==--
Re: How can i pass an object like $t from my .pl to .pm file
ukhas jean wrote:
> Hello all ...
>
> I have created a Net::Telnet object (say $t) in my script ... say a.pl
> ... but since the code for "a.pl" is increasing; i decided to created
> "modules" eg. host.pm.
>
> now i want to call this Telnet-object $t in host.pm ... how do i do that??
>
> How can i pass an object like $t from my .pl to .pm file???
> Any pointers are really appreciated.
Once you've included host.pm with a use, you can pass it as an arg to
a sub or use it globally.
our $tobj = new Net::Telnet or die ...
my $ret = host::somesub ($tobj); # pass object into sub in host.pm
or if you've inported the sub: my $ret = somesub ($tobj);
host.pm subs could access $tobj directly also (less structured) in host.pm.
sub somesub { # access main global $tobj from host.pm
print Data::Dumper->Dump([$main::tobj], [qw($main::tobj)]);
}
_______________________________________________
ActivePerl mailing list
ActivePerl [at] listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: How can i pass an object like $t from my .pl to .pm file
--============== 30262884==
Content-Type: multipart/alternative; boundary="0-1384683666-1173161966=:21103"
Content-Transfer-Encoding: 7bit
--0-1384683666-1173161966=:21103
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Sorry wrong question ... i passed it as a normal parameter and it worked.
ukhas jean <ukh_dtl [at] yahoo.com> wrote:
Hello all ...
I have created a Net::Telnet object (say $t) in my script ... say a.pl =
.... but since the code for "a.pl" is increasing; i decided to created "mo=
dules" eg. host.pm.
now i want to call this Telnet-object $t in host.pm ... how do i do tha=
t??
How can i pass an object like $t from my .pl to .pm file???
Any pointers are really appreciated.
Ukh
---------------------------------
Don't be flakey. Get Yahoo! Mail for Mobile and
always stay connected to friends.________________________________________=
_______
ActivePerl mailing list
ActivePerl [at] listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
---------------------------------
Any questions? Get answers on any topic at Yahoo! Answers. Try it now.
--0-1384683666-1173161966=:21103
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
<div>Sorry wrong question ... i passed it as a normal parameter and it wo=
rked.</div> <div> </div> <div><B><I>ukhas jean <ukh_dtl [at] yahoo.c=
om></I></B> wrote:</div> <BLOCKQUOTE class=3Dreplbq style=3D"PADDING-=
LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid"> <DIV>Hello=
all ... </DIV> <DIV> </DIV> <DIV>I have created a Net::Telnet obj=
ect (say $t) in my script ... say a.pl ... but since the code for "a.pl" =
is increasing; i decided to created "modules" eg. host.pm.</DIV> <DIV>&n=
bsp;</DIV> <DIV>now i want to call this Telnet-object $t in host.pm ... =
how do i do that??</DIV> <DIV> </DIV> <DIV>How can i pass an objec=
t like $t from my .pl to .pm file???</DIV> <DIV>Any pointers are re=
ally appreciated.</DIV> <DIV> </DIV> <DIV>Ukh</DIV> <div> <HR SI=
ZE=3D1> Don't be flakey. <A href=3D"http://us.rd.yahoo.com/evt=3D43909/*=
http://mobile.yahoo.com/mail">Get Yahoo! Mail for Mobile</A> and <BR><A
href=3D"http://us.rd.yahoo.com/evt=3D43909/*http://mobile.ya hoo.com/mail=
">always stay connected</A> to friends.__________________________________=
_____________<BR>ActivePerl mailing list<BR>ActivePerl [at] listserv.ActiveSta=
te.com<BR>To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs<=
/BLOCKQUOTE><BR><p>
<hr size=3D1>Any questions? Get answers on any topic at <a href=3D"http:=
//answers.yahoo.com/;_ylc=3DX3oDMTFvbGNhMGE3BF9TAzM5NjU0NTEw OARfcwMzOTY1N=
DUxMDMEc2VjA21haWxfdGFnbGluZQRzbGsDbWFpbF90YWcx">Yahoo! Answers</a>. Try =
it now.
--0-1384683666-1173161966=:21103--
--============== 30262884==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
ActivePerl mailing list
ActivePerl [at] listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
--============== 30262884==--
Re: How can i pass an object like $t from my .pl to .pm file
--===============0043356526==
Content-Type: multipart/alternative; boundary="0-162994645-1173163420=:44719"
Content-Transfer-Encoding: 7bit
--0-162994645-1173163420=:44719
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Hello Bill et al,
I am using perl 5.8 on windowsXP. till now i have been running scripts =
using the .pl file.
i have to send a few files to the client hence would require to convert=
my code (comprising of .pl and .pm files) into .exe
q. 1. which is the best tool for this?? (since google is giving me show=
many options!)
q. 2. also this .exe the client may run on windows/unix. will the creat=
ion of an .exe on windows affect its performance on unix??
(PS:: i aint using any OS-specific command in my script)
Bill Luebkert <dbecoll [at] roadrunner.com> wrote:
ukhas jean wrote:
> Hello all ...
>
> I have created a Net::Telnet object (say $t) in my script ... say a.pl
> ... but since the code for "a.pl" is increasing; i decided to created
> "modules" eg. host.pm.
>
> now i want to call this Telnet-object $t in host.pm ... how do i do tha=
t??
>
> How can i pass an object like $t from my .pl to .pm file???
> Any pointers are really appreciated.
Once you've included host.pm with a use, you can pass it as an arg to
a sub or use it globally.
our $tobj =3D new Net::Telnet or die ...
my $ret =3D host::somesub ($tobj); # pass object into sub in host.pm
or if you've inported the sub: my $ret =3D somesub ($tobj);
host.pm subs could access $tobj directly also (less structured) in host.p=
m.
sub somesub { # access main global $tobj from host.pm
print Data::Dumper->Dump([$main::tobj], [qw($main::tobj)]);
}
---------------------------------
Expecting? Get great news right away with email Auto-Check.
Try the Yahoo! Mail Beta.
--0-162994645-1173163420=:44719
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
<div>Hello Bill et al,</div> <div> </div> <div>I am using perl 5.8=
on windowsXP. till now i have been running scripts using the .pl file.</=
div> <div>i have to send a few files to the client hence would require t=
o convert my code (comprising of .pl and .pm files) into .exe</div> <div=
> </div> <div>q. 1. which is the best tool for this?? (since google=
is giving me show many options!)</div> <div> </div> <div>q. 2. al=
so this .exe the client may run on windows/unix. will the creation of an =
..exe on windows affect its performance on unix??</div> <div> </div>=
<div>(PS:: i aint using any OS-specific command in my script)<BR><BR><B=
><I>Bill Luebkert <dbecoll [at] roadrunner.com></I></B> wrote:</div> <B=
LOCKQUOTE class=3Dreplbq style=3D"PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BO=
RDER-LEFT: #1010ff 2px solid">ukhas jean wrote:<BR>> Hello all ...<BR>=
> <BR>> I have created a Net::Telnet object (say $t) in my script .=
... say a.pl <BR>> ... but since the code
for "a.pl" is increasing; i decided to created <BR>> "modules" eg. ho=
st.pm.<BR>> <BR>> now i want to call this Telnet-object $t in host.=
pm ... how do i do that??<BR>> <BR>> How can i pass an object like =
$t from my .pl to .pm file???<BR>> Any pointers are really appreciated=
..<BR><BR>Once you've included host.pm with a use, you can pass it as an a=
rg to<BR>a sub or use it globally.<BR><BR>our $tobj =3D new Net::Telnet o=
r die ...<BR><BR>my $ret =3D host::somesub ($tobj); # pass object into su=
b in host.pm<BR><BR>or if you've inported the sub: my $ret =3D somesub ($=
tobj);<BR><BR>host.pm subs could access $tobj directly also (less structu=
red) in host.pm.<BR><BR>sub somesub { # access main global $tobj from hos=
t.pm<BR>print Data::Dumper->Dump([$main::tobj], [qw($main::tobj)]);<BR=
>}<BR><BR></BLOCKQUOTE><BR><p>
<hr size=3D1>Expecting? Get great news right away with <a href=3D"http://=
us.rd.yahoo.com/evt=3D49982/*http://advision.webevents.yahoo .com/mailbeta=
/newmail_tools.html">email Auto-Check.</a><br>Try the <a href=3D"http://u=
s.rd.yahoo.com/evt=3D49982/*http://advision.webevents.yahoo. com/mailbeta/=
newmail_tools.html">Yahoo! Mail Beta.</a>
--0-162994645-1173163420=:44719--
--===============0043356526==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
ActivePerl mailing list
ActivePerl [at] listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
--===============0043356526==--
Re: How can i pass an object like $t from my .pl to .pm file
> q. 1. which is the best tool for this?? (since google is giving me show
> many options!)
Always dangerous to name something 'best'...so I'll just give a
recommendation based on what I use. Doesn't necessarily mean the other
alternatives won't work - I just have no experience with anything else.
So: try the PDK (Perl Dev Kit) from ActiveState.
>q. 2. also this .exe the client may run on windows/unix. will the creation
>of an .exe on windows affect its performance on unix??
You misunderstand the issue. A windows .exe will never run on Unix. Instead,
the PDK has multiple implementations for various Windows and Unix flavors,
thus enabling you to build executables for each platform (so you need access
to platform P to build an executable for it - no 'cross compiling').
HTH,
ken1
_______________________________________________
ActivePerl mailing list
ActivePerl [at] listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: How can i pass an object like $t from my .pl to .pm file
Actually, a Windows .exe CAN run on Linux, under Wine. =3D)
Tony
Kenneth =D6lwing wrote:
>> q. 1. which is the best tool for this?? (since google is giving me show =
>> many options!)
> =
> Always dangerous to name something 'best'...so I'll just give a =
> recommendation based on what I use. Doesn't necessarily mean the other =
> alternatives won't work - I just have no experience with anything else.
> =
> So: try the PDK (Perl Dev Kit) from ActiveState.
> =
>> q. 2. also this .exe the client may run on windows/unix. will the creati=
on =
>> of an .exe on windows affect its performance on unix??
> =
> You misunderstand the issue. A windows .exe will never run on Unix. Inste=
ad, =
> the PDK has multiple implementations for various Windows and Unix flavors=
, =
> thus enabling you to build executables for each platform (so you need acc=
ess =
> to platform P to build an executable for it - no 'cross compiling').
> =
> HTH,
> =
> ken1 =
> =
> _______________________________________________
> ActivePerl mailing list
> ActivePerl [at] listserv.ActiveState.com
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
> =
> =
-- =
I always have coffee when I watch radar!
_______________________________________________
ActivePerl mailing list
ActivePerl [at] listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: How can i pass an object like $t from my .pl to .pm file
ukhas jean wrote:
> Hello Bill et al,
>
> I am using perl 5.8 on windowsXP. till now i have been running scripts
> using the .pl file.
> i have to send a few files to the client hence would require to convert
> my code (comprising of .pl and .pm files) into .exe
>
> q. 1. which is the best tool for this?? (since google is giving me show
> many options!)
You've got Activestate's PDK, perl2exe and PAR. Google away.
> q. 2. also this .exe the client may run on windows/unix. will the
> creation of an .exe on windows affect its performance on unix??
Obviously the exe has to be for the target system or possbily run under
emulation.
> (PS:: i aint using any OS-specific command in my script)
_______________________________________________
ActivePerl mailing list
ActivePerl [at] listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: How can i pass an object like $t from my .pl to .pm file
We don't test that tho, so YMMV. Just compile on the platform you =
want to run on!
JeffG
On 5-Mar-07, at 11:27 PM, Anthony R. Nemmer wrote:
> Actually, a Windows .exe CAN run on Linux, under Wine. =3D)
>
> Tony
>
> Kenneth =D6lwing wrote:
>>> q. 1. which is the best tool for this?? (since google is giving =
>>> me show
>>> many options!)
>>
>> Always dangerous to name something 'best'...so I'll just give a
>> recommendation based on what I use. Doesn't necessarily mean the =
>> other
>> alternatives won't work - I just have no experience with anything =
>> else.
>>
>> So: try the PDK (Perl Dev Kit) from ActiveState.
>>
>>> q. 2. also this .exe the client may run on windows/unix. will the =
>>> creation
>>> of an .exe on windows affect its performance on unix??
>>
>> You misunderstand the issue. A windows .exe will never run on =
>> Unix. Instead,
>> the PDK has multiple implementations for various Windows and Unix =
>> flavors,
>> thus enabling you to build executables for each platform (so you =
>> need access
>> to platform P to build an executable for it - no 'cross compiling').
>>
>> HTH,
>>
>> ken1
>>
>> _______________________________________________
>> ActivePerl mailing list
>> ActivePerl [at] listserv.ActiveState.com
>> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
>>
>>
>
> -- =
>
> I always have coffee when I watch radar!
> _______________________________________________
> ActivePerl mailing list
> ActivePerl [at] listserv.ActiveState.com
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
>
>
Jeff Griffiths
jeffg [at] activestate.com
_______________________________________________
ActivePerl mailing list
ActivePerl [at] listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs