Re: function named reset()
Chris Wagner wrote: That was a pretty nice demonstration of the diabolical power of references. ;) I think this illustrates one of the soft underbellies (read: feature) of Perl, which is that with unrestricted references ur never quite sure what entity it is ur dealing with. I've never been a real fan of the reference system. Atleast give us a choice to whether reference or pointer constructs. Right now sometimes u have to guess what Perl is doing behind ur back and a lot of times it can come back to bite u. I know it's nailed me quite a few times. If I had my way implicit args would be abolished and I'ld really really love to see real arrays. But now I digress. Maybe a new pragma: use superstrict; or use strongtyping; Which would arn you if you try to do anything questionable and then we'd need an accompanying override symbol (if all the symbols haven't already been used up) that says I know what I'm doing on this one, so don't warn me. I'm sure there are lots of people asking for stronger typing in the future that could prevent lots of these gotchas. -- ,-/- __ _ _ $Bill LuebkertMailto:[EMAIL PROTECTED] (_/ / )// // DBE CollectiblesMailto:[EMAIL PROTECTED] / ) /-- o // // Castle of Medieval Myth Magic http://www.todbe.com/ -/-' /___/__/_/_http://dbecoll.tripod.com/ (My Perl/Lakers stuff) ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: function named reset()
Chris Wagner wrote: : I *always* call my own defined functions/subroutines with the : prefix. It's just good practice. Allowing the to be omitted : just encourages bad programming practices. And I'm sorry that : ur bad practice has finally caught up with u but pouting isn't : going to help anything. If u truly knew what u were doing u : would know about the reset function or atleast how to look it : up in the book. But I guess it's completely impracticle to : expect u to follow good practice in ur code. Chris, I think this is more a style practice than a good programming practice. I always avoid and many contributors to this list also seem to avoid it. Personally, I attach a strong perl 4 stigma to its use. I have very rarely seen it used in modules written in the last few years. When I see its use I immediately think Oh crap, this guy is maintaining a really old script. Remembering the names of built-in functions becomes easier as we familiarize ourselves with perl or get better tools like syntax highlighting. HTH, Charles K. Clarkson -- Mobile Homes Specialist 254 968-8328 ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: function named reset()
Chris Wagner wrote: : I *always* call my own defined functions/subroutines with the : prefix. It's just good practice. Allowing the to be omitted : just encourages bad programming practices. And I'm sorry that : ur bad practice has finally caught up with u but pouting isn't : going to help anything. If u truly knew what u were doing u : would know about the reset function or atleast how to look it : up in the book. But I guess it's completely impracticle to : expect u to follow good practice in ur code. Chris, I think this is more a style practice than a good programming practice. I always avoid and many contributors to this list also seem to avoid it. Personally, I attach a strong perl 4 stigma to its use. I have very rarely seen it used in modules written in the last few years. When I see its use I immediately think Oh crap, this guy is maintaining a really old script. Remembering the names of built-in functions becomes easier as we familiarize ourselves with perl or get better tools like syntax highlighting. HTH, Charles K. Clarkson -- Mobile Homes Specialist 254 968-8328 ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: function named reset()
Chris Wagner wrote: : I *always* call my own defined functions/subroutines with the : prefix. It's just good practice. Allowing the to be omitted : just encourages bad programming practices. And I'm sorry that : ur bad practice has finally caught up with u but pouting isn't : going to help anything. If u truly knew what u were doing u : would know about the reset function or atleast how to look it : up in the book. But I guess it's completely impracticle to : expect u to follow good practice in ur code. Chris, I think this is more a style practice than a good programming practice. I always avoid and many contributors to this list also seem to avoid it. Personally, I attach a strong perl 4 stigma to its use. I have very rarely seen it used in modules written in the last few years. When I see its use I immediately think Oh crap, this guy is maintaining a really old script. Remembering the names of built-in functions becomes easier as we familiarize ourselves with perl or get better tools like syntax highlighting. HTH, Charles K. Clarkson -- Mobile Homes Specialist 254 968-8328 ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: function named reset()
Chris Wagner wrote: : I *always* call my own defined functions/subroutines with the : prefix. It's just good practice. Allowing the to be omitted : just encourages bad programming practices. And I'm sorry that : ur bad practice has finally caught up with u but pouting isn't : going to help anything. If u truly knew what u were doing u : would know about the reset function or atleast how to look it : up in the book. But I guess it's completely impracticle to : expect u to follow good practice in ur code. Chris, I think this is more a style practice than a good programming practice. I always avoid and many contributors to this list also seem to avoid it. Personally, I attach a strong perl 4 stigma to its use. I have very rarely seen it used in modules written in the last few years. When I see its use I immediately think Oh crap, this guy is maintaining a really old script. Remembering the names of built-in functions becomes easier as we familiarize ourselves with perl or get better tools like syntax highlighting. HTH, Charles K. Clarkson -- Mobile Homes Specialist 254 968-8328 ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: function named reset()
Chris Wagner wrote: : I *always* call my own defined functions/subroutines with the : prefix. It's just good practice. Allowing the to be omitted : just encourages bad programming practices. And I'm sorry that : ur bad practice has finally caught up with u but pouting isn't : going to help anything. If u truly knew what u were doing u : would know about the reset function or atleast how to look it : up in the book. But I guess it's completely impracticle to : expect u to follow good practice in ur code. Chris, I think this is more a style practice than a good programming practice. I always avoid and many contributors to this list also seem to avoid it. Personally, I attach a strong perl 4 stigma to its use. I have very rarely seen it used in modules written in the last few years. When I see its use I immediately think Oh crap, this guy is maintaining a really old script. Remembering the names of built-in functions becomes easier as we familiarize ourselves with perl or get better tools like syntax highlighting. HTH, Charles K. Clarkson -- Mobile Homes Specialist 254 968-8328 ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: function named reset()
Chris Wagner wrote: : I *always* call my own defined functions/subroutines with the : prefix. It's just good practice. Allowing the to be omitted : just encourages bad programming practices. And I'm sorry that : ur bad practice has finally caught up with u but pouting isn't : going to help anything. If u truly knew what u were doing u : would know about the reset function or atleast how to look it : up in the book. But I guess it's completely impracticle to : expect u to follow good practice in ur code. Chris, I think this is more a style practice than a good programming practice. I always avoid and many contributors to this list also seem to avoid it. Personally, I attach a strong perl 4 stigma to its use. I have very rarely seen it used in modules written in the last few years. When I see its use I immediately think Oh crap, this guy is maintaining a really old script. Remembering the names of built-in functions becomes easier as we familiarize ourselves with perl or get better tools like syntax highlighting. HTH, Charles K. Clarkson -- Mobile Homes Specialist 254 968-8328 ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: function named reset()
Chris Wagner wrote: : I *always* call my own defined functions/subroutines with the : prefix. It's just good practice. Allowing the to be omitted : just encourages bad programming practices. And I'm sorry that : ur bad practice has finally caught up with u but pouting isn't : going to help anything. If u truly knew what u were doing u : would know about the reset function or atleast how to look it : up in the book. But I guess it's completely impracticle to : expect u to follow good practice in ur code. Chris, I think this is more a style practice than a good programming practice. I always avoid and many contributors to this list also seem to avoid it. Personally, I attach a strong perl 4 stigma to its use. I have very rarely seen it used in modules written in the last few years. When I see its use I immediately think Oh crap, this guy is maintaining a really old script. Remembering the names of built-in functions becomes easier as we familiarize ourselves with perl or get better tools like syntax highlighting. HTH, Charles K. Clarkson -- Mobile Homes Specialist 254 968-8328 ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: function named reset()
Chris Wagner wrote: : I *always* call my own defined functions/subroutines with the : prefix. It's just good practice. Allowing the to be omitted : just encourages bad programming practices. And I'm sorry that : ur bad practice has finally caught up with u but pouting isn't : going to help anything. If u truly knew what u were doing u : would know about the reset function or atleast how to look it : up in the book. But I guess it's completely impracticle to : expect u to follow good practice in ur code. Chris, I think this is more a style practice than a good programming practice. I always avoid and many contributors to this list also seem to avoid it. Personally, I attach a strong perl 4 stigma to its use. I have very rarely seen it used in modules written in the last few years. When I see its use I immediately think Oh crap, this guy is maintaining a really old script. Remembering the names of built-in functions becomes easier as we familiarize ourselves with perl or get better tools like syntax highlighting. HTH, Charles K. Clarkson -- Mobile Homes Specialist 254 968-8328 ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: function named reset()
Chris Wagner wrote: : I *always* call my own defined functions/subroutines with the : prefix. It's just good practice. Allowing the to be omitted : just encourages bad programming practices. And I'm sorry that : ur bad practice has finally caught up with u but pouting isn't : going to help anything. If u truly knew what u were doing u : would know about the reset function or atleast how to look it : up in the book. But I guess it's completely impracticle to : expect u to follow good practice in ur code. Chris, I think this is more a style practice than a good programming practice. I always avoid and many contributors to this list also seem to avoid it. Personally, I attach a strong perl 4 stigma to its use. I have very rarely seen it used in modules written in the last few years. When I see its use I immediately think Oh crap, this guy is maintaining a really old script. Remembering the names of built-in functions becomes easier as we familiarize ourselves with perl or get better tools like syntax highlighting. HTH, Charles K. Clarkson -- Mobile Homes Specialist 254 968-8328 ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: function named reset()
Chris Wagner wrote: : I *always* call my own defined functions/subroutines with the : prefix. It's just good practice. Allowing the to be omitted : just encourages bad programming practices. And I'm sorry that : ur bad practice has finally caught up with u but pouting isn't : going to help anything. If u truly knew what u were doing u : would know about the reset function or atleast how to look it : up in the book. But I guess it's completely impracticle to : expect u to follow good practice in ur code. Chris, I think this is more a style practice than a good programming practice. I always avoid and many contributors to this list also seem to avoid it. Personally, I attach a strong perl 4 stigma to its use. I have very rarely seen it used in modules written in the last few years. When I see its use I immediately think Oh crap, this guy is maintaining a really old script. Remembering the names of built-in functions becomes easier as we familiarize ourselves with perl or get better tools like syntax highlighting. HTH, Charles K. Clarkson -- Mobile Homes Specialist 254 968-8328 ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: function named reset()
Chris Wagner wrote: : I *always* call my own defined functions/subroutines with the : prefix. It's just good practice. Allowing the to be omitted : just encourages bad programming practices. And I'm sorry that : ur bad practice has finally caught up with u but pouting isn't : going to help anything. If u truly knew what u were doing u : would know about the reset function or atleast how to look it : up in the book. But I guess it's completely impracticle to : expect u to follow good practice in ur code. Chris, I think this is more a style practice than a good programming practice. I always avoid and many contributors to this list also seem to avoid it. Personally, I attach a strong perl 4 stigma to its use. I have very rarely seen it used in modules written in the last few years. When I see its use I immediately think Oh crap, this guy is maintaining a really old script. Remembering the names of built-in functions becomes easier as we familiarize ourselves with perl or get better tools like syntax highlighting. HTH, Charles K. Clarkson -- Mobile Homes Specialist 254 968-8328 ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: function named reset()
Chris Wagner wrote: : I *always* call my own defined functions/subroutines with the : prefix. It's just good practice. Allowing the to be omitted : just encourages bad programming practices. And I'm sorry that : ur bad practice has finally caught up with u but pouting isn't : going to help anything. If u truly knew what u were doing u : would know about the reset function or atleast how to look it : up in the book. But I guess it's completely impracticle to : expect u to follow good practice in ur code. Chris, I think this is more a style practice than a good programming practice. I always avoid and many contributors to this list also seem to avoid it. Personally, I attach a strong perl 4 stigma to its use. I have very rarely seen it used in modules written in the last few years. When I see its use I immediately think Oh crap, this guy is maintaining a really old script. Remembering the names of built-in functions becomes easier as we familiarize ourselves with perl or get better tools like syntax highlighting. HTH, Charles K. Clarkson -- Mobile Homes Specialist 254 968-8328 ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: function named reset()
Chris Wagner wrote: : I *always* call my own defined functions/subroutines with the : prefix. It's just good practice. Allowing the to be omitted : just encourages bad programming practices. And I'm sorry that : ur bad practice has finally caught up with u but pouting isn't : going to help anything. If u truly knew what u were doing u : would know about the reset function or atleast how to look it : up in the book. But I guess it's completely impracticle to : expect u to follow good practice in ur code. Chris, I think this is more a style practice than a good programming practice. I always avoid and many contributors to this list also seem to avoid it. Personally, I attach a strong perl 4 stigma to its use. I have very rarely seen it used in modules written in the last few years. When I see its use I immediately think Oh crap, this guy is maintaining a really old script. Remembering the names of built-in functions becomes easier as we familiarize ourselves with perl or get better tools like syntax highlighting. HTH, Charles K. Clarkson -- Mobile Homes Specialist 254 968-8328 ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: function named reset()
Chris Wagner wrote: : I *always* call my own defined functions/subroutines with the : prefix. It's just good practice. Allowing the to be omitted : just encourages bad programming practices. And I'm sorry that : ur bad practice has finally caught up with u but pouting isn't : going to help anything. If u truly knew what u were doing u : would know about the reset function or atleast how to look it : up in the book. But I guess it's completely impracticle to : expect u to follow good practice in ur code. Chris, I think this is more a style practice than a good programming practice. I always avoid and many contributors to this list also seem to avoid it. Personally, I attach a strong perl 4 stigma to its use. I have very rarely seen it used in modules written in the last few years. When I see its use I immediately think Oh crap, this guy is maintaining a really old script. Remembering the names of built-in functions becomes easier as we familiarize ourselves with perl or get better tools like syntax highlighting. HTH, Charles K. Clarkson -- Mobile Homes Specialist 254 968-8328 ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: function named reset()
Chris Wagner wrote: : I *always* call my own defined functions/subroutines with the : prefix. It's just good practice. Allowing the to be omitted : just encourages bad programming practices. And I'm sorry that : ur bad practice has finally caught up with u but pouting isn't : going to help anything. If u truly knew what u were doing u : would know about the reset function or atleast how to look it : up in the book. But I guess it's completely impracticle to : expect u to follow good practice in ur code. Chris, I think this is more a style practice than a good programming practice. I always avoid and many contributors to this list also seem to avoid it. Personally, I attach a strong perl 4 stigma to its use. I have very rarely seen it used in modules written in the last few years. When I see its use I immediately think Oh crap, this guy is maintaining a really old script. Remembering the names of built-in functions becomes easier as we familiarize ourselves with perl or get better tools like syntax highlighting. HTH, Charles K. Clarkson -- Mobile Homes Specialist 254 968-8328 ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: function named reset()
Chris Wagner wrote: : I *always* call my own defined functions/subroutines with the : prefix. It's just good practice. Allowing the to be omitted : just encourages bad programming practices. And I'm sorry that : ur bad practice has finally caught up with u but pouting isn't : going to help anything. If u truly knew what u were doing u : would know about the reset function or atleast how to look it : up in the book. But I guess it's completely impracticle to : expect u to follow good practice in ur code. Chris, I think this is more a style practice than a good programming practice. I always avoid and many contributors to this list also seem to avoid it. Personally, I attach a strong perl 4 stigma to its use. I have very rarely seen it used in modules written in the last few years. When I see its use I immediately think Oh crap, this guy is maintaining a really old script. Remembering the names of built-in functions becomes easier as we familiarize ourselves with perl or get better tools like syntax highlighting. HTH, Charles K. Clarkson -- Mobile Homes Specialist 254 968-8328 ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: function named reset()
Chris Wagner wrote: : I *always* call my own defined functions/subroutines with the : prefix. It's just good practice. Allowing the to be omitted : just encourages bad programming practices. And I'm sorry that : ur bad practice has finally caught up with u but pouting isn't : going to help anything. If u truly knew what u were doing u : would know about the reset function or atleast how to look it : up in the book. But I guess it's completely impracticle to : expect u to follow good practice in ur code. Chris, I think this is more a style practice than a good programming practice. I always avoid and many contributors to this list also seem to avoid it. Personally, I attach a strong perl 4 stigma to its use. I have very rarely seen it used in modules written in the last few years. When I see its use I immediately think Oh crap, this guy is maintaining a really old script. Remembering the names of built-in functions becomes easier as we familiarize ourselves with perl or get better tools like syntax highlighting. HTH, Charles K. Clarkson -- Mobile Homes Specialist 254 968-8328 ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: function named reset()
Chris Wagner wrote: : I *always* call my own defined functions/subroutines with the : prefix. It's just good practice. Allowing the to be omitted : just encourages bad programming practices. And I'm sorry that : ur bad practice has finally caught up with u but pouting isn't : going to help anything. If u truly knew what u were doing u : would know about the reset function or atleast how to look it : up in the book. But I guess it's completely impracticle to : expect u to follow good practice in ur code. Chris, I think this is more a style practice than a good programming practice. I always avoid and many contributors to this list also seem to avoid it. Personally, I attach a strong perl 4 stigma to its use. I have very rarely seen it used in modules written in the last few years. When I see its use I immediately think Oh crap, this guy is maintaining a really old script. Remembering the names of built-in functions becomes easier as we familiarize ourselves with perl or get better tools like syntax highlighting. HTH, Charles K. Clarkson -- Mobile Homes Specialist 254 968-8328 ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: function named reset()
Chris Wagner wrote: : I *always* call my own defined functions/subroutines with the : prefix. It's just good practice. Allowing the to be omitted : just encourages bad programming practices. And I'm sorry that : ur bad practice has finally caught up with u but pouting isn't : going to help anything. If u truly knew what u were doing u : would know about the reset function or atleast how to look it : up in the book. But I guess it's completely impracticle to : expect u to follow good practice in ur code. Chris, I think this is more a style practice than a good programming practice. I always avoid and many contributors to this list also seem to avoid it. Personally, I attach a strong perl 4 stigma to its use. I have very rarely seen it used in modules written in the last few years. When I see its use I immediately think Oh crap, this guy is maintaining a really old script. Remembering the names of built-in functions becomes easier as we familiarize ourselves with perl or get better tools like syntax highlighting. HTH, Charles K. Clarkson -- Mobile Homes Specialist 254 968-8328 ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: function named reset()
Chris Wagner wrote: : I *always* call my own defined functions/subroutines with the : prefix. It's just good practice. Allowing the to be omitted : just encourages bad programming practices. And I'm sorry that : ur bad practice has finally caught up with u but pouting isn't : going to help anything. If u truly knew what u were doing u : would know about the reset function or atleast how to look it : up in the book. But I guess it's completely impracticle to : expect u to follow good practice in ur code. Chris, I think this is more a style practice than a good programming practice. I always avoid and many contributors to this list also seem to avoid it. Personally, I attach a strong perl 4 stigma to its use. I have very rarely seen it used in modules written in the last few years. When I see its use I immediately think Oh crap, this guy is maintaining a really old script. Remembering the names of built-in functions becomes easier as we familiarize ourselves with perl or get better tools like syntax highlighting. HTH, Charles K. Clarkson -- Mobile Homes Specialist 254 968-8328 ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: function named reset()
Chris Wagner wrote: : I *always* call my own defined functions/subroutines with the : prefix. It's just good practice. Allowing the to be omitted : just encourages bad programming practices. And I'm sorry that : ur bad practice has finally caught up with u but pouting isn't : going to help anything. If u truly knew what u were doing u : would know about the reset function or atleast how to look it : up in the book. But I guess it's completely impracticle to : expect u to follow good practice in ur code. Chris, I think this is more a style practice than a good programming practice. I always avoid and many contributors to this list also seem to avoid it. Personally, I attach a strong perl 4 stigma to its use. I have very rarely seen it used in modules written in the last few years. When I see its use I immediately think Oh crap, this guy is maintaining a really old script. Remembering the names of built-in functions becomes easier as we familiarize ourselves with perl or get better tools like syntax highlighting. HTH, Charles K. Clarkson -- Mobile Homes Specialist 254 968-8328 ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Sorry about the extra messages: RE: function named reset()
Don't know what happened there. Sorry about the extra messages. ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: Sorry about the extra messages: RE: function named reset()
Charles K. Clarkson wrote: Don't know what happened there. Sorry about the extra messages. I keep tolding ya and tolding ya - quit using that M$ email crap. -- ,-/- __ _ _ $Bill LuebkertMailto:[EMAIL PROTECTED] (_/ / )// // DBE CollectiblesMailto:[EMAIL PROTECTED] / ) /-- o // // Castle of Medieval Myth Magic http://www.todbe.com/ -/-' /___/__/_/_http://dbecoll.tripod.com/ (My Perl/Lakers stuff) ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: function named reset()
At 05:35 PM 4/7/2005, Chris Wagner wrote: I *always* call my own defined functions/subroutines with the prefix. It's just good practice. Allowing the to be omitted just encourages bad programming practices. And I'm sorry that ur bad practice has finally caught up with u but pouting isn't going to help anything. If u truly knew what u were doing u would know about the reset function or atleast how to look it up in the book. But I guess it's completely impracticle to expect u to follow good practice in ur code. I think that you'd better get off your soapbox until you've thought things through. The bottom line is, you go out an buy some standard Perl books, you program the way it's shown there. Things seem to always work correctly until one day you write a function named reset(), assuming that when you call it, it will actually be executed, just like all the other functions you've used for years, but it's not. Does it mean your boss gets incorrect data? Does it mean the space shuttle crashes? Who knows? I'll bet if you asked 90% of Perl programmers what 'reset' does - they won't have any idea. That should tell you something. I'll also bet that if you look at 90% of Perl code, you won't see what you characterize as good practice. If I'm not mistaken, the 'P' stands for practical. ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: function named reset()
Here's something I found on the 'perldiag' man page: Ambiguous call resolved as CORE::%s(), qualify as such or use (W ambiguous) A subroutine you have declared has the same name as a Perl keyword, and you have used the name without qualification for calling one or the other. Perl decided to call the builtin because the subroutine is not imported. To force interpretation as a subroutine call, either put an ampersand before the subroutine name, or qualify the name with its package. Alternatively, you can import the subroutine (or pretend that it's imported with the use subs pragma). To silently interpret it as the Perl operator, use the CORE:: prefix on the operator (e.g. CORE::log($x)) or declare the subroutine to be an object method (see Subroutine Attributes in the perlsub manpage or the attributes manpage). However, I can't get this warning to appear. Is it that 'reset' isn't a 'keyword'? Simple example script below. Note that, as mentioned by others, if I change the line reset(); to reset(); or main::reset(), the function is called. However, what I want is to get at least a warning whenever I attempt an ambiguous call, just as the perldiag entry says. Any ideas? ( I have tried explicitly using 'use warnings ambiguous;' - no effect). use strict; use warnings all; reset(); print(OK\n); # -- sub reset { print(resetting...\n); } ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: Sorry about the extra messages: RE: function named reset()
:D Trying to send me a message there, eh? At 06:18 AM 4/8/05 -0500, Charles K. Clarkson wrote: Don't know what happened there. Sorry about the extra messages. -- REMEMBER THE WORLD TRADE CENTER ---= WTC 911 =-- ...ne cede males 0100 ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: function named reset()
To force interpretation as a subroutine call, either put an ampersand before the subroutine name, or qualify the name with its package. Alternatively, you can import the subroutine (or pretend that it's imported with the use subs pragma). 'use subs' doesn't seem to always work, though. when you do it with reset() it works, but I tried grep() and it doesn't, but grep() and main::grep do. Hmmm ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: function named reset()
John Deighan wrote: [snip] : However, I can't get this warning to appear. Is it that : 'reset' isn't a 'keyword'? [snip] No. You just gave up too quickly. #!/usr/bin/perl use strict; use warnings; use diagnostics; sub reset; print reset(); sub reset { return resetting...\n; } __END__ OR: use strict; use warnings; use diagnostics; sub reset { return resetting...\n; } print reset(); __END__ HTH, Charles K. Clarkson -- Mobile Homes Specialist 254 968-8328 ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: function named reset()
At 02:40 PM 4/8/2005, Charles K. Clarkson wrote: John Deighan wrote: [snip] : However, I can't get this warning to appear. Is it that : 'reset' isn't a 'keyword'? [snip] No. You just gave up too quickly. #!/usr/bin/perl use strict; use warnings; use diagnostics; sub reset; print reset(); sub reset { return resetting...\n; } Thanks for the tip. However, it turns out to have nothing to do with use diagnostics. The warning appears (when compiling as well as executing, which is great), if and only if the subroutine is declared or defined before being called. Compare the following 3 programs: 1. This one generates no warnings, either at compile or run time: use strict; use warnings; reset(); print(OK\n); sub reset { print(resetting...\n); } 2. This one generates the ambiguous call warning AND a prototype mismatch warning: use strict; use warnings; sub reset(); reset(); print(OK\n); sub reset { print(resetting...\n); } 3. This one generates just the ambiguous call warning: use strict; use warnings; sub reset { print(resetting...\n); } reset(); print(OK\n); Everyone - thanks for all your help and interesting discussion. ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: function named reset()
Did you try to rename the function - just to rule out any name conflicts? If so, what does your function look like? And how do you call it? Cheers, Gerhard |-+- | | | | | | | | | | | | | | | | |John Deighan [EMAIL PROTECTED]| | | | | |Sent by: | | |[EMAIL PROTECTED]| | |.com | | | | | |2005-04-07 03:43 PM | |-+- --| | | | To: perl-win32-users@listserv.ActiveState.com | | cc: (bcc: Gerhard Petrowitsch/STN/SC/PHILIPS) | | Subject:function named reset() | | | | Classification: | | | | | --| I wrote a script, and in it, I defined a function named reset. However, when I call that function, nothing happens. What's going on here? I realize that this may be the name of a built-in function or something, but surely that can't override a function defined in the same file where the function is being called? ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: function named reset()
John Deighan wrote: I wrote a script, and in it, I defined a function named reset. However, when I call that function, nothing happens. What's going on here? I realize that this may be the name of a built-in function or something, but surely that can't override a function defined in the same file where the function is being called? It took me 2 seconds to do a search in my combined Perl docs to find: reset EXPR reset Generally used in a continue block at the end of a loop to clear variables and reset ?? searches so that they work again. The expression is interpreted as a list of single characters (hyphens allowed for ranges). All variables and arrays beginning with one of those letters are reset to their pristine state. If the expression is omitted, one-match searches (?pattern?) are reset to match again. Resets only variables or searches in the current package. Always returns 1. Examples: reset 'X'; # reset all X variables reset 'a-z';# reset lower case variables reset; # just reset ?one-time? searches Resetting A-Z is not recommended because you'll wipe out your @ARGV and @INC arrays and your %ENV hash. Resets only package variables--lexical variables are unaffected, but they clean themselves up on scope exit anyway, so you'll probably want to use them instead. See my. If you don't have combined docs, you can use 'perldoc -f reset' -- ,-/- __ _ _ $Bill LuebkertMailto:[EMAIL PROTECTED] (_/ / )// // DBE CollectiblesMailto:[EMAIL PROTECTED] / ) /-- o // // Castle of Medieval Myth Magic http://www.todbe.com/ -/-' /___/__/_/_http://dbecoll.tripod.com/ (My Perl/Lakers stuff) ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: function named reset()
At 10:07 AM 4/7/2005, $Bill Luebkert wrote: John Deighan wrote: I wrote a script, and in it, I defined a function named reset. However, when I call that function, nothing happens. What's going on here? I realize that this may be the name of a built-in function or something, but surely that can't override a function defined in the same file where the function is being called? It took me 2 seconds to do a search in my combined Perl docs to find: That's all very useful information, but there's no mention of what takes precedence - this reset statement or a user function named reset. Why would an obscure feature like this reset statement take precedence over a user-written function with the same name? The result will inevitably be that buggy code will be created. In my case, I provided data to my boss that was incorrect because the reset() function that I wrote wasn't being called. There's no way that I'm going to take the name of every function I ever write and search the Perl docs to see if it's a reserved name. reset EXPR reset Generally used in a continue block at the end of a loop to clear variables and reset ?? searches so that they work again. The expression is interpreted as a list of single characters (hyphens allowed for ranges). All variables and arrays beginning with one of those letters are reset to their pristine state. If the expression is omitted, one-match searches (?pattern?) are reset to match again. Resets only variables or searches in the current package. Always returns 1. Examples: reset 'X'; # reset all X variables reset 'a-z';# reset lower case variables reset; # just reset ?one-time? searches Resetting A-Z is not recommended because you'll wipe out your @ARGV and @INC arrays and your %ENV hash. Resets only package variables--lexical variables are unaffected, but they clean themselves up on scope exit anyway, so you'll probably want to use them instead. See my. If you don't have combined docs, you can use 'perldoc -f reset' -- ,-/- __ _ _ $Bill LuebkertMailto:[EMAIL PROTECTED] (_/ / )// // DBE CollectiblesMailto:[EMAIL PROTECTED] / ) /-- o // // Castle of Medieval Myth Magic http://www.todbe.com/ -/-' /___/__/_/_http://dbecoll.tripod.com/ (My Perl/Lakers stuff) Scanned for Spam and Viruses. ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: function named reset()
There's no way that I'm going to take the name of every function I ever write and search the Perl docs to see if it's a reserved name. But don't you just get that feeling that maybe reset might be a fxn of note? You could always preface your functions w/ something...may be something that indicates desired scope, or type of fxn, or something like that. ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: function named reset()
Chris Cappelletti wrote: There's no way that I'm going to take the name of every function I ever write and search the Perl docs to see if it's a reserved name. But don't you just get that feeling that maybe reset might be a fxn of note? You could always preface your functions w/ something...may be something that indicates desired scope, or type of fxn, or something like that. ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs I have the habit of starting all functions with f_ it lets other programmers who have to read my code easily identify functions, which is especially important in perl it also prevents the problem of a reserved names. cheers lori ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: function named reset()
John Deighan wrote: : : That's all very useful information, but there's no mention of what : takes precedence - this reset statement or a user function named : reset. Why would an obscure feature like this reset statement : take precedence over a user-written function with the same name? All perl functions take precedence. You can override them, though. Read perlsub: Overriding Built-in Functions. Using OO you can write methods with almost any legal name without conflict. #!/usr/bin/perl -T use strict; use warnings; use subs 'reset'; print reset(); sub reset { return 'CORE::reset overridden'; } __END__ Charles K. Clarkson -- Mobile Homes Specialist 254 968-8328 ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: function named reset()
use subs 'reset'; Another way is to explicitly state that you want to use the main namespace: ### use strict; my $x = 'a'; my $y = 'b'; print x=$x,y=$y\n; reset; print x=$x,y=$y\n; main-reset; print x=$x,y=$y\n; sub reset { $x = 'c'; $y = 'd'; } ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: function named reset()
John Deighan wrote: That's all very useful information, but there's no mention of what takes precedence - this reset statement or a user function named reset. Why would an obscure feature like this reset statement take precedence over a user-written function with the same name? The result will inevitably be that buggy code will be created. In my case, I provided data to my boss that was incorrect because the reset() function that I wrote wasn't being called. There's no way that I'm going to take the name of every function I ever write and search the Perl docs to see if it's a reserved name. A good highlighting editor would have given you a clue (gvim for example will highlight in brown all core functions). Adding a '' or 'main::' in front of the name: reset ($arg); main::reset ($arg); should get your sub rather than the core function. use subs qw(reset); will also work as previously posted. I suggest you read the perlsub man page for some background. The syntax highlighting file in gvim has a pretty comprehensive list of reserved words if you want a copy - or even better adopt it as your editor (an emacs variant, if you prefer, should also be fine). -- ,-/- __ _ _ $Bill LuebkertMailto:[EMAIL PROTECTED] (_/ / )// // DBE CollectiblesMailto:[EMAIL PROTECTED] / ) /-- o // // Castle of Medieval Myth Magic http://www.todbe.com/ -/-' /___/__/_/_http://dbecoll.tripod.com/ (My Perl/Lakers stuff) ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: function named reset()
At 12:17 PM 4/7/2005, $Bill Luebkert wrote: John Deighan wrote: That's all very useful information, but there's no mention of what takes precedence - this reset statement or a user function named reset. Why would an obscure feature like this reset statement take precedence over a user-written function with the same name? The result will inevitably be that buggy code will be created. In my case, I provided data to my boss that was incorrect because the reset() function that I wrote wasn't being called. There's no way that I'm going to take the name of every function I ever write and search the Perl docs to see if it's a reserved name. A good highlighting editor would have given you a clue (gvim for example will highlight in brown all core functions). I really think that this is the only genuinely useful suggestion I've heard. We've currently got hundreds of thousands of lines of code and I'd hate to have to count the number of functions (not to mention function calls) in our code. It's completely impracticle to expect us to add main:: or or use subs in all of this code. I doubt that anyone is going to be able to come up with a rule for which function names look suspicious and need to be investigated further. I also personally feel that code is more readable if functions names are simple and reflect their purpose, so I'm not going to add otherwise meaningless prefixes, which could never guarantee no name conflicts anyway.Now, I'm beginning to wonder about a lot of the functions I've written with meaningful names. Adding a '' or 'main::' in front of the name: reset ($arg); main::reset ($arg); should get your sub rather than the core function. use subs qw(reset); will also work as previously posted. I suggest you read the perlsub man page for some background. The syntax highlighting file in gvim has a pretty comprehensive list of reserved words if you want a copy - or even better adopt it as your editor (an emacs variant, if you prefer, should also be fine). -- ,-/- __ _ _ $Bill LuebkertMailto:[EMAIL PROTECTED] (_/ / )// // DBE CollectiblesMailto:[EMAIL PROTECTED] / ) /-- o // // Castle of Medieval Myth Magic http://www.todbe.com/ -/-' /___/__/_/_http://dbecoll.tripod.com/ (My Perl/Lakers stuff) Scanned for Spam and Viruses. ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: function named reset()
I really think that this is the only genuinely useful suggestion I've heard. May be so, but I bet you make an effort in the future to not clobber built-in functions. Although, I think the 'use subs' pragma is a good suggestion as it would only require one added line. ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: function named reset()
At 04:32 PM 4/7/05 -0400, John Deighan wrote: calls) in our code. It's completely impracticle to expect us to add main:: or or use subs in all of this code. I doubt that anyone is I *always* call my own defined functions/subroutines with the prefix. It's just good practice. Allowing the to be omitted just encourages bad programming practices. And I'm sorry that ur bad practice has finally caught up with u but pouting isn't going to help anything. If u truly knew what u were doing u would know about the reset function or atleast how to look it up in the book. But I guess it's completely impracticle to expect u to follow good practice in ur code. going to be able to come up with a rule for which function names look suspicious and need to be investigated further. I also personally feel that code is more readable if functions names are simple and reflect their purpose, so I'm not going to add otherwise meaningless prefixes, which could never guarantee no name conflicts anyway. Actually, yes, those meaningless prefixes will gaurantee that u won't get name conflicts. The bottom line is u've feathered ur own nest and now that u have to lie in it don't come bitching that it's perl's fault u screwed up. If u want to fix the situation I and others are perfectly willing to help. It's a triviality to write a script that will repair ur broken script(s). Basically foreach $i (@script) { $i =~ s/reset/myreset/g; }. There are other ways too which people have mentioned. -- REMEMBER THE WORLD TRADE CENTER ---= WTC 911 =-- ...ne cede males 0100 ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: function named reset()
Chris Wagner wrote: At 04:32 PM 4/7/05 -0400, John Deighan wrote: calls) in our code. It's completely impracticle to expect us to add main:: or or use subs in all of this code. I doubt that anyone is I *always* call my own defined functions/subroutines with the prefix. It's just good practice. Allowing the to be omitted just encourages bad programming practices. You do know about the side effects of , don't you? And you also know that it circumvents prototype checking, of course (but then again, who uses those?). #!/usr/bin/perl some(1,2); sub some { print some sees @_$/; my $this = shift; print some shifts $this$/; other; my $that = shift; print some shifts $that, but it's gone :($/; } sub other { my $that = shift; print other shifts $that, but we didn't pass any arguments to it$/; } __END__ some sees 1 2 some shifts 1 other shifts 2, but we didn't pass any arguments to it some shifts , but it's gone :( Rhesa ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: function named reset()
At 12:06 AM 4/8/05 +0200, Rhesa Rozendaal wrote: You do know about the side effects of , don't you? And you also know that it circumvents prototype checking, of course (but then again, who uses those?). I also categorize implicit arguments under bad practice. ;) -- REMEMBER THE WORLD TRADE CENTER ---= WTC 911 =-- ...ne cede males 0100 ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: function named reset()
Chris Wagner wrote: At 12:06 AM 4/8/05 +0200, Rhesa Rozendaal wrote: You do know about the side effects of , don't you? And you also know that it circumvents prototype checking, of course (but then again, who uses those?). I also categorize implicit arguments under bad practice. ;) Ah, but it isn't always! That's why you should be explicit in how you call subroutines: *only* use the when you intend to make use of the side effects (and trust me, you don't want to do that most of the time). I think your original advice is bad practice, that was the point I wanted to make. Just for the fun of it, here's an example where it _can_ be useful: #!/usr/bin/perl use strict; use warnings; sub some { print some sees @_$/; my $this = shift; print some shifts $this$/; print some was called from: , join ' ', caller(); } { no warnings 'redefine'; ## shhh, don't tell anyone my $old_some = \some; *some = sub { print Evil hacker sees that some will get @_ ...$/; goto $old_some; # we don't show up in the call stack, hehehe }; } some(1,2); # this is line 22 __END__ Evil hacker sees that some will get 1 2 ... some sees 1 2 some shifts 1 some was called from: main ~/tmp/cwagner2.pl 22 Okay, it may not look very useful like this... But this allows you to modify API's on the fly without disrupting the underlying code. Rhesa ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: function named reset()
Chris Wagner wrote: I *always* call my own defined functions/subroutines with the prefix. It's just good practice. Allowing the to be omitted just encourages bad programming practices. Before the change in meaning for I would have agreed with you, but you can't do that and expect to use prototypes and you have to be careful in the case of calling a sub with no args cause it will expose the @_ from one level above. Now, I never use unless it has to be there for syntactic reasons - otherwise there's too much hassle trying to remember whether you used protypes or not for that function and I don't often use prototypes since little of my work is production work. Personally, I would like a warning in the situation where you redefine a core function and an easy way to override the warning when it was your intent to do so. Maybe Perl6 has this resolved - I haven't been checking in much recently. -- ,-/- __ _ _ $Bill LuebkertMailto:[EMAIL PROTECTED] (_/ / )// // DBE CollectiblesMailto:[EMAIL PROTECTED] / ) /-- o // // Castle of Medieval Myth Magic http://www.todbe.com/ -/-' /___/__/_/_http://dbecoll.tripod.com/ (My Perl/Lakers stuff) ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: function named reset()
At 01:04 AM 4/8/05 +0200, Rhesa Rozendaal wrote: Evil hacker sees that some will get 1 2 ... some sees 1 2 some shifts 1 some was called from: main ~/tmp/cwagner2.pl 22 That was a pretty nice demonstration of the diabolical power of references. ;) I think this illustrates one of the soft underbellies (read: feature) of Perl, which is that with unrestricted references ur never quite sure what entity it is ur dealing with. I've never been a real fan of the reference system. Atleast give us a choice to whether reference or pointer constructs. Right now sometimes u have to guess what Perl is doing behind ur back and a lot of times it can come back to bite u. I know it's nailed me quite a few times. If I had my way implicit args would be abolished and I'ld really really love to see real arrays. But now I digress. -- REMEMBER THE WORLD TRADE CENTER ---= WTC 911 =-- ...ne cede males 0100 ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs