You should compress the data and than append it with __DATA__ or as a string saved with Base64 to avoid binary errors.
Here's a simple sample: use Compress::Zlib qw(compress uncompress) ; use MIME::Base64 qw(encode_base64 decode_base64) ; my $uncompressed = 'some sample data' ; my $base64 = encode_base64( compress($uncompressed) ) ; print "$base64\n" ; my $original = uncompress( decode_base64($base64) ) ; print "$original\n" ; Regards, Graciliano M. P. ----- Original Message ----- From: "Scott W Gifford" <[EMAIL PROTECTED]> To: <[email protected]> Sent: Wednesday, January 05, 2005 12:48 AM Subject: [Spam] Including a 480K data file with a module > Hello, > > I'm working with T.J. Mather on updating Geo::PostalCode. One of the > things we're looking at is how to manage the ZIP code database that's > necessary for its operation. I've proposed creating a > Geo::PostalCode::US module as a very simple subclass of > Geo::PostalCode, and bundling the ZIP code data with that module. The > data is 1.3MB uncompressed, and compressed the entire module is about > 480K. We have some concerns this may be frowned on, however, so I > thought I'd get some feedback here. > > The advantages of having the data on CPAN is that the entire module is > self-sufficient and widely mirrored. It makes it much easier to > install, and if you have a CPAN distribution on CD or in a local > mirror, you have everything you need. The disadvantage is that it > takes up 480K on every single CPAN mirror. > > Are there other modules that do this? Is there a consensus on what's > appropriate? And what are the list members opinions on the matter? > > Thanks! > > -----ScottG. > > E-mail classificado pelo Identificador de Spam Inteligente Terra. > Para alterar a categoria classificada, visite > http://www.terra.com.br/centralunificada/emailprotegido/imail/imail.cgi?+_u= gmpowers&_l=1,1104896949.850686.30145.lusaca.terra.com.br,2642,2003112711410 1,20031127114101 > > Esta mensagem foi verificada pelo E-mail Protegido Terra. > Scan engine: McAfee VirusScan / Atualizado em 29/12/2004 / Vers�o: 4.4.00 - Dat 4417 > Proteja o seu e-mail Terra: http://www.emailprotegido.terra.com.br/ > > > > -- > No virus found in this incoming message. > Checked by AVG Anti-Virus. > Version: 7.0.300 / Virus Database: 265.6.8 - Release Date: 3/1/2005 > > -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 265.6.8 - Release Date: 3/1/2005
