Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Re^3: What are the files in a CPAN distribution?

by tobyink (Abbot)
on Dec 21, 2012 at 14:17 UTC ( #1009918=note: print w/replies, xml ) Need Help??

in reply to Re^2: What are the files in a CPAN distribution?
in thread What are the files in a CPAN distribution?

My general position on this is that the CPAN distribution is not the development tree; the CPAN distribution is a product of the development tree.

My repo may contain a bunch of extra files (author tests, Devel::Cover output, benchmarking scripts, etc) which are not included in the distro. And similarly the distribution will contain a bunch of auto-generated files (like META.yml, Changes, LICENSE, etc) that I have no desire to check into my repo.

However if I go under a bus tomorrow and somebody else needs to pick up the distro, they don't actually need any of that stuff. They could just download the tarball, extract the files, make a few changes, bump the version numbers, and then use tar to create a new tarball, and upload it.

OK, that might seem like a pain for them not to be able to use the author tests, etc I have in my repo, but actually if you think about it, it makes it easier for them to transition the distribution to their own build tools. They can start working on the distribution the way they like to work on software, not the way I like to work on software. (Especially considering I'm somewhat of an oddball in my development style!)

perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1009918]
[Corion]: Meh. I'm now on Firefox 57 ("Quantum") and again have to remove Pocket, and reinstall the adblocker, uMatrix (because NoScript doesn't work) and silence the about:blank page to not download crap from the internet
[Corion]: Maybe I shouldn't update software ...
[ambrus]: Corion: my guess is to first read the start of the file to check what format it is out of two or more possibilities, then rewind it and handle it differently depending on the program
[ambrus]: s/program/format/
[Dumu]: ambrus: it's about testing a file for being multiple possible file formats
[ambrus]: In particular, you might want to detect the encoding of a HTML file from between utf-16 versus ascii-based and encoding given in a META tag.
[ambrus]: Dumu: it should probably be safe to change the encoding if you rewind first with seek $file, 0, 0 first
[Dumu]: ambrus: good guess. I'm trying to contribute to a CPAN module, and the existing tests assume they're looking at text files
[Dumu]: ambrus: thank you. I was seeking afterwards. I'll seek first.
[jedikaiti]: Hello, Dumu!

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (12)
As of 2017-11-20 17:53 GMT
Find Nodes?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:

    Results (290 votes). Check out past polls.