Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: recursively comparing heterogenous data structures

by bikeNomad (Priest)
on Jul 06, 2001 at 21:00 UTC ( [id://94517]=note: print w/replies, xml ) Need Help??


in reply to recursively comparing heterogenous data structures

You can generalize this into a more useful routine by allowing the user to provide optional subroutine refs that will be called when:<bl>
  • A has something that B doesn't
  • B has something that A doesn't
  • A and B have different values
  • A and B have same values </bl>

    See Algorithm::Diff for an example of passing in such subroutines. And you should also provide for an extra scalar that will be passed to the user subroutines, so the user can provide context to them without using globals.

    • Comment on Re: recursively comparing heterogenous data structures
  • Log In?
    Username:
    Password:

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

    How do I use this?Last hourOther CB clients
    Other Users?
    Others taking refuge in the Monastery: (4)
    As of 2024-04-24 22:46 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found