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

Re: Trying to Understand Callback(s)

by Anonymous Monk
on Nov 23, 2017 at 23:25 UTC ( [id://1204177] : note . print w/replies, xml ) Need Help??


in reply to Trying to Understand Callback(s)

When Mojo needs to (say ...) "get a URL," it will "call back" to a subroutine that you provided (within your own application, not Mojo) for that purpose. To accomplish this, you are providing a reference to the particular subroutine within your application that you want to be called. Mojo then calls your subroutine by means of that reference, as other Monks have already shown.