Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Nested Modules in perl

by vinoth.ree (Monsignor)
on Aug 03, 2015 at 11:48 UTC ( [id://1137239]=note: print w/replies, xml ) Need Help??


in reply to Nested Modules in perl

Hi gjoshi,

Please post us the exact error + the code you are trying so that we can help you better.

Read: How do I post a question effectively?


All is well. I learn by answering your questions...

Replies are listed 'Best First'.
Re^2: Nested Modules in perl
by gjoshi (Sexton) on Aug 04, 2015 at 04:00 UTC
    Hi all, as MidLifeXis was saying I am trying to do same thing. Here is my code: Module Connectivity.pm
    use MyDB; our @ISA = qw(Exporter); our @EXPORT = qw(ConnectSsh SendAndGet_Cmd); sub ConnectSsh { #connect to shell #writes to DB WriteValueToDB ($text) } sub SendAndGet_Cmd { my ($cmd) = @_; #sends commands over shell handle } 1;
    MyDB.pm
    our @ISA = qw(Exporter); our @EXPORT = qw(EndRub WriteValueToDB ); sub EndRub { #send close command $op = SendAndGet_Cmd($test); #add status to DB WriteValueToDB ($op); } sub WriteValueToDB { my ($test) = @_; #write to DB ... .... .... } 1;
    Now you see both are dependent on each other. So if I am getting error declaration is already done.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1137239]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2024-04-23 22:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found