Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Okay, I've searched around a bit and am having trouble finding what I want. I remember a while back there was a web site where you could type in a line or two or twenty of perl, and it would just go over it and make sure the syntax was correct. It would just check to see if brackets and parens were properly matched and stuff like that, no attempt to interpret or compile the code. You could paste in something like
Am I dreaming, or is something like this still around? I've not been an active sys admin for over 15 years, so I am certainly out of the loop. I'm trying to keep some old Namazu and MHarc based searchable email archives working as best I can.
Okay, I've searched around a bit and am having trouble finding what I want. I remember a while back there was a web site where you could type in a line or two or twenty of perl, and it would just go over it and make sure the syntax was correct. It would just check to see if brackets and parens were properly matched and stuff like that, no attempt to interpret or compile the code. You could paste in something like
Am I dreaming, or is something like this still around? I've not been an active sys admin for over 15 years, so I am certainly out of the loop. I'm trying to keep some old Namazu and MHarc based searchable email archives working as best I can.
Don't know about such a site, but I personally use a context-sensitive editor/IDE. KDevelop is the one I prefer, but Anjuta is another. Both will 'color code' your source, and if there's a problem it'll highlight. In KDevelop, it can even auto-complete parens/brackets (if you enable it), so you always have a trailing one. That said, it will also highlight a different color if you DON'T have a matching bracket, and show you both.
Okay, an actual example of what I have happening. The Namazu script to generate indices returns this, in part, for some of the email lists:
Code:
Useless use of greediness modifier '?' in regex; marked by <-- HERE in m/^\w+:{1,1}? <-- HERE / at /usr/local/share/namazu/filter/mp3.pl line 155
And I also get this:
Code:
[root@autox bin]# perl -c /usr/local/share/namazu/filter/mp3.pl
/usr/local/share/namazu/filter/mp3.pl syntax OK
So perl claims it is correct, and perl claims it is incorrect. Which is why I am looking for something other than 'perl -c'
ps:
Code:
This is perl 5, version 28, subversion 2 (v5.28.2) built for x86_64-linux-thread-multi
Use CODE tags when posting.
What you received was a warning, added in Perl 5.20. The code is technically CORRECT, and will compile and run...but it's telling you that you're doing something pointless. https://github.com/Perl/perl5/issues/8899
Much the same as using STRICT will cause some code not to work, and removing the strict qualifier will let it work...it's just ignoring minor problems and/or best practices, in favor of things functioning.
So perl claims it is correct, and perl claims it is incorrect.
No, perl claims it is useless. That means:
Code:
Useless use of greediness modifier '?' in regex; marked by <-- HERE in m/^\w+:{1,1}? <-- HERE / at /usr/local/share/namazu/filter/mp3.pl line 155
the ? after the red part is useless, that has no any effect. Could be ignored/dropped. But accepted.
Actually {1,1} is pointless too, but need to see more to be sure about that.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.