Perl5-IDEA icon indicating copy to clipboard operation
Perl5-IDEA copied to clipboard

New File: defaulting to Script instead of Package

Open rwp0 opened this issue 2 years ago • 5 comments

It hit me many times

everytime I do File -> New -> Perl5 File I accidentally create a module with .PM extension instead of a script.

Perl script

I think scripts should be the default because they are created/used more often than modules for Perl code.

There were .pl before .pm existed historically as well.

Thanks.

rwp0 avatar May 04 '22 10:05 rwp0

Well, this is questionable. E.g web application will have a single starter script and all the code going to be in pm controllers/templates. Not in pl scripts. Also, here is alphabetical sorting, Package and script. not extensions. However, I can understand your concern and feels like IDE should remember last choice or smth. But this feels like an IDE feature not a plugin.

hurricup avatar May 04 '22 11:05 hurricup

Can we configure it on plugin-level without changing the defaults?

An option for this would be very useful.

Also, if I name my script .pl it still creates it as a module (suffix could be read as well).

rwp0 avatar May 04 '22 11:05 rwp0

configure what? Atm this menu is pretty static and dumb.

hurricup avatar May 04 '22 12:05 hurricup

Configure the selected item or the order of items in the menu.

I see, but might be worthy to enhance it a bit for that reason.

rwp0 avatar May 04 '22 13:05 rwp0

No, it's not possible atm

hurricup avatar May 04 '22 13:05 hurricup

Haha saw you mixing those on YouTube as well 😋

rwp0 avatar Mar 11 '23 18:03 rwp0

true :) but usually in real projects you are working with pms

hurricup avatar Mar 12 '23 04:03 hurricup