Re: dhandler calls function defined in another dhandler, why?
Jonathan Swartz <[email protected]> Tue, 16 Apr 2013 09:43:06 -0700
| Newsgroups | gmane.comp.web.mason.user |
|---|---|
| Message-ID | <[email protected]> |
All HTML::Mason components are defined in the same package, so you should not use named subroutines. Use anonymous subroutines instead. On Apr 16, 2013, at 6:27 AM, Pavel Cina <[email protected]> wrote: > Hi, > > I have two dhalndlers: > /api/resources/devices/bs2/tapes/dhandler > /api/resources/devices/bs2/disks/dhandler > > > Both implements function called handle_get: > .../tapes/dhandler: > sub handle_get > { > put_log("TAPE handle_get"); > ... > } > > .../disks/dhandler: > sub handle_get > { > put_log("DISK handle_get"); > ... > } > > Sometimes happens, that DISK dhandler calls handle_get function defined in TAPE dhandler or vice versa. Here one example from my log file: > OK case: > 2013-04-11T17:53:17+02:00 rho1 (debug) SQM [13243]: 127.0.0.1 /api/resources/devices/bs2/tapes /api/resources/devices/bs2/tapes/dhandler > 2013-04-11T17:53:17+02:00 rho1 (debug) SQM [13243]: 127.0.0.1 /api/resources/devices/bs2/tapes TAPE dhandler(Method:GET, Path:, Data:) > 2013-04-11T17:53:17+02:00 rho1 (debug) SQM [13243]: 127.0.0.1 /api/resources/devices/bs2/tapes TAPE handle_get > > > Error case: > 2013-04-11T17:53:18+02:00 rho1 (debug) SQM [13238]: 127.0.0.1 /api/resources/devices/bs2/tapes /api/resources/devices/bs2/tapes/dhandler > 2013-04-11T17:53:18+02:00 rho1 (debug) SQM [13238]: 127.0.0.1 /api/resources/devices/bs2/tapes TAPE dhandler(Method:GET, Path:, Data:) > 2013-04-11T17:53:18+02:00 rho1 (debug) SQM [13238]: 127.0.0.1 /api/resources/devices/bs2/tapes DISK handle_get > > How can this happen? Is it a bug or normal behavior? > > Cheers > Pavel > > ------------------------------------------------------------------------------ > Precog is a next-generation analytics platform capable of advanced > analytics on semi-structured data. The platform includes APIs for building > apps and a phenomenal toolset for data science. Developers can use > our toolset for easy data analysis & visualization. Get a free account! > http://www2.precog.com/precogplatform/slashdotnewsletter_______________________________________________ > Mason-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/mason-users ------------------------------------------------------------------------------ Precog is a next-generation analytics platform capable of advanced analytics on semi-structured data. The platform includes APIs for building apps and a phenomenal toolset for data science. Developers can use our toolset for easy data analysis & visualization. Get a free account! http://www2.precog.com/precogplatform/slashdotnewsletter _______________________________________________ Mason-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mason-users