On Sun, Nov 16, 2008 at 14:33, Mr. Shawn H. Corey <[EMAIL PROTECTED]> wrote: > On Sun, 2008-11-16 at 13:23 -0500, Chas. Owens wrote: >> On Sun, Nov 16, 2008 at 09:11, a b <[EMAIL PROTECTED]> wrote: >> > Hi , >> > Can any body tells me what do we mean by below code >> > <snip> >> > $ROUTE::COMM{NEWROUTE}{OS()} >> > </snip> >> > >> > Thanks in Advance >> > a b . >> > >> >> No, there is not enough context for me to know why this code is being >> used and off hand it looks like useless code to me (it is asking for a >> value and not doing anything with it), but I can tell you a few things >> that may be true about it: >> >> There is a subroutine named OS defined somewhere. >> There is a module named ROUTE. >> That module has a hash named COMM. >> That hash (possibly) has a key named NEWROUTE whose value is expected >> to be a hashref. > > There is a package named ROUTE. Whether it's a module or an object is > yet to be determined. If it's an object then %ROUTE::COMM is a class > variable. snip
Well, if we are going to be picky about language it is a class not an object (objects are created at runtime from classes). Also, there is no difference between a package and a class in Perl. To be a module a package must be in a separate file and must end with a true value, so it is true that ROUTE is not necessarily at module; it could be a package inside the same file (which is one of the reasons I said "may be true"). Of course, given the existence of source filters, it could do anything. -- Chas. Owens wonkden.net The most important skill a programmer can have is the ability to read. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/