Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Package problem with defining subroutines

by Anonymous Monk
on Feb 05, 2013 at 15:48 UTC ( #1017207=note: print w/replies, xml ) Need Help??


in reply to Package problem with defining subroutines

You've got infinite loop
  • Comment on Re: Package problem with defining subroutines

Replies are listed 'Best First'.
Re^2: Package problem with defining subroutines
by AlfaProject (Beadle) on Feb 05, 2013 at 15:55 UTC
    I know, but how I can prevent it by design ?
    For example you have DB.pm which all modules uses it .
    Then a User.pm and UserRating.pm , that using each other for retrieving info
    Reading posts from #1 reply (tnx)

      Refactor, break the circle

      sub tst1 { mutual_util(); ... } sub tst2 { mutual_util(); ... }

      Take whatever tst1 does that calls tst2, take whatever test2 does that calls tst1 , make it a new function, and instead of calling each other, call this third function

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1017207]
help
Chatterbox?
[Happy-the-monk]: old 's cool, eh?
[Corion]: :) I had to reconnect my DVD drive to actually burn the CD-R - I think I last spun it up three years ago or something...
Discipulus must burn phot cd to send to mother in law..

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (12)
As of 2017-11-20 18:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (291 votes). Check out past polls.

    Notices?