-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cowsay -r: "Cannot load cow from /usr/share/cowsay/cows/TextBalloon.pm: .pm format cows are not implemented yet. Sorry." #22
Comments
Your expectation is correct. The random-cow-selection code should be fixed to do this. |
If all cow files worked, the selection code could remain unchanged. :-) AFAICT, that would mean implementing support for the I have not examined the differences between |
I believe the .pm cow format is the future (but as an optional alternative; the original .cow format will not go away and most people will still want to use it instead), and it allows you to build cows more dynamically, for whatever reason you might want to do that. But AFAICT, it never got implemented in the first place, and would take a bit of work, and I'm kinda busy. So that's why we don't have .pm support here yet. Given that, I think the right move here is to exclude .pm cows from the random selection. Unless you'd like to submit a PR with .pm cow support. ;) |
And remove the broken non-extension
Hmm... Maybe. I have not done Perl in about 20 years, and I have never written anything of consequence in Perl like a script longer than a few hundred lines, much less an API to last. I could give it a try and re-learn some Perl. Do not hold your breath for that, though. This is not mission critical after all. Also, do not expect very good Perl API design or very good Perl code. On the other hand, keeping old and more or less non-essential but still interesting software maintained at least to the point of keeping it running on contemporary systems is just my thing. Lets see. A categorical maybe. |
D'oh! Yeah, that too.
I was 100% joking here. I would not recommend this as a project if you have anything else interesting to do. :) |
As it has not been mentioned yet in this issue, issue #14 tracks implementing |
Only install cow files called *.cow into the $(cowsdir)/. This happens to fix cowsay-org#22 for default cowsay installation as the "cowsay -r" random cow selection algorithm now can only select from *.cow format cows from the default cowsay installation. However, the site-cows/ dir can still contain arbitrary types of cow files, and third party cow collections can still dump their cows into cowsay's $(cowsdir)/ dir as well, so for those non-defaultinstallations, issue cowsay-org#22 will *NOT* be fixed.
Only install cow files called *.cow into the $(cowsdir)/. This happens to fix cowsay-org#22 for default cowsay installation as the "cowsay -r" random cow selection algorithm now can only select from *.cow format cows from the default cowsay installation. However, the site-cows/ dir can still contain arbitrary types of cow files, and third party cow collections can still dump their cows into cowsay's $(cowsdir)/ dir as well, so for those non-defaultinstallations, issue cowsay-org#22 will *NOT* be fixed. This also helps against unintentionally installing e.g. editor backup files like "share/cows/default.cow~"
When running
cowsay -r
, occasionally cowsay fails with a message likeI would expect
cowsay -r
to choose a random cow from all the available cows which actually work, and then use that.Quick command to reproduce:
while date | cowsay -r; do :; done
A look into
/usr/share/cowsay/cows/
shows 7*.pm
files, onemech-and-cow
file without a file extension, and a few dozen*.cow
files.Manually choosing a certain cow does not make the
*.pm
cows work either. Themech-and-cow
(without file extension) cow does not work either, but triggers a different error:And for completeness' sake:
The text was updated successfully, but these errors were encountered: