Changeset View
Changeset View
Standalone View
Standalone View
kconf_update/gwenview-imageview-alphabackgroundmode-update.pl
- This file was added.
1 | #!/usr/bin/env perl | ||||
---|---|---|---|---|---|
2 | | ||||
ngraham: Is there ever going to be an environment where this could run that doesn't have Perl? I'm not… | |||||
The docs say the following on that topic:
Also, lots of similar kconf_update scripts are written in Perl, so I guess this is fine. rkflx: [The docs](https://techbase.kde.org/Development/Tools/Using_kconf_update) say the following on… | |||||
Thanks for answering for me :) huoni: Thanks for answering for me :)
Those are indeed the reasons I chose Perl. | |||||
This path does not exist on some systems I tested. Konversation uses /usr/bin/perl, but I guess the "official" way would be #!/usr/bin/env perl. rkflx: This path does not exist on some systems I tested. Konversation uses `/usr/bin/perl`, but I… | |||||
3 | use strict; | ||||
4 | | ||||
5 | while (<STDIN>) { | ||||
6 | s/RasterImageView::AlphaBackgroundSolid/AbstractImageView::AlphaBackgroundSolid/; | ||||
7 | print $_; | ||||
8 | } |
Is there ever going to be an environment where this could run that doesn't have Perl? I'm not one of those Perl haters, but it seems like this could be done more easily and in a more guaranteed-bulletproof manner with sed in a shell script instead.