Re: [webmin-devel] Strict
Chris Nighswonger <[email protected]> Fri, 22 Mar 2013 10:54:44 -0400
| Newsgroups | gmane.comp.web.webmin.devel |
|---|---|
| Message-ID | <CAP3yOokj1kNPzbQw5tZOeD04rGYNiogg=1SMOhahZnQ5agLVbA@mail.gmail.com> |
--===============3611504829666492080== Content-Type: multipart/alternative; boundary=e89a8fb1fbbaeacd7e04d884a3cc --e89a8fb1fbbaeacd7e04d884a3cc Content-Type: text/plain; charset=UTF-8 On Fri, Mar 22, 2013 at 7:48 AM, Emma wasanzy <[email protected]>wrote: > Hello, > > I have noticed that, the webmin API doesnt support the use of strict and > warning. Because any time I tried using them, I get so many "Global ...." > errors which are related to the API. Why isn't the API using strict? > > I'm sure only the webmin developer knows why he did not use strict, however, you can still use it. Just initialize vars you intend on importing thus: #!/usr/bin/perl our( %in, %text, %config ); use strict; use warnings; etc..... Older Perl did not support the 'our' pragma, but 'vars.' [1] So keep that in mind if you are using an older Perl. Kind Regards, Chris [1] http://perldoc.perl.org/vars.html --e89a8fb1fbbaeacd7e04d884a3cc Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <div class=3D"gmail_quote">On Fri, Mar 22, 2013 at 7:48 AM, Emma wasanzy <s= pan dir=3D"ltr"><<a href=3D"mailto:[email protected]" target=3D"_bl= ank">[email protected]</a>></span> wrote:<br><blockquote class=3D"g= mail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-l= eft:1ex"> <p>Hello, </p> <p>I have noticed that, the webmin API doesnt support the use of strict and= warning. Because any time I tried using them, I get so many "Global .= ..." errors which are related to the API. Why isn't the API using = strict?</p> <br></blockquote></div><br>I'm sure only the webmin developer knows why= he did not use strict, however, you can still use it. Just initialize vars= you intend on importing thus:<br><br>#!/usr/bin/perl<br><br>our( %in, %tex= t, %config );<br> <br>use strict;<br>use warnings;<br><br>etc.....<br><br>Older Perl did not = support the 'our' pragma, but 'vars.' [1] So keep that in m= ind if you are using an older Perl.<br><br>Kind Regards,<br>Chris<br><br> [1] <a href=3D"http://perldoc.perl.org/vars.html">http://perldoc.perl.org/v= ars.html</a><br> --e89a8fb1fbbaeacd7e04d884a3cc-- --===============3611504829666492080== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_mar --===============3611504829666492080== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline - Forwarded by the Webmin development list at [email protected] To remove yourself from this list, go to http://lists.sourceforge.net/lists/listinfo/webadmin-devel --===============3611504829666492080==--