Re: setting up a file hierarchy
On Tue, May 19, 2009 at 06:30:03PM +0100, Ash Berlin wrote: > On 19 May 2009, at 17:19, David Cantrell wrote: > >On Tue, May 19, 2009 at 04:50:06PM +0100, Chisel Wright wrote: > >>On Tue, May 19, 2009 at 04:33:06PM +0100, David Cantrell wrote: > >>>I'll pay attention when it doesn't rely on Module::Install. > >>Should I ask why? > >Would you like to install mandatory pre-requisite Foo::Bar for this > >'ere module what you told the comptuer to install? Y/n > Your information is out of date. My logs from running the tests and installing thousands of modules a week say you're wrong. > This no longer happens for new > modules. Yes it does. > If it does then complain at that module author to upgrade his > dist. Or at Alias to make Module::Install fucking well self update. Or just automate the problem away using CPAN distroprefs. But *none* of those solutions make Module::Install suck less for people who aren't part of the Perl Cabal. > Also File::ShareDir doesn't rely on Module::Install at all The documentation for File::ShareDir disagrees with you. " For the installation half of the solution, see Module::Install and its install_share directive. " > Module::Install just gives you an way to install the files in the > 'right' place. Module::Build can easily do it to. Module::Build ain't exactly my favourite part of the toolchain either. -- David Cantrell | Official London Perl Mongers Bad Influence Us Germans take our humour very seriously -- German cultural attache talking to the Today Programme, about the German supposed lack of a sense of humour, 29 Aug 2001
Re: setting up a file hierarchy
On 19 May 2009, at 17:19, David Cantrell wrote: On Tue, May 19, 2009 at 04:50:06PM +0100, Chisel Wright wrote: On Tue, May 19, 2009 at 04:33:06PM +0100, David Cantrell wrote: I'll pay attention when it doesn't rely on Module::Install. Should I ask why? Would you like to install mandatory pre-requisite Foo::Bar for this 'ere module what you told the comptuer to install? Y/n Would you like to install mandatory pre-requisite Baz::Barf for this 'ere module what you told the comptuer to install? Y/n Would you like to install mandatory pre-requisite Quux::Garbleflux for this 'ere module what you told the comptuer to install? Y/n -- David Cantrell | http://www.cantrell.org.uk/david You are so cynical. And by "cynical", of course, I mean "correct". -- Kurt Starsinic Your information is out of date. This no longer happens for new modules. If it does then complain at that module author to upgrade his dist. Or at Alias to make Module::Install fucking well self update. Also File::ShareDir doesn't rely on Module::Install at all - Module::Install just gives you an way to install the files in the 'right' place. Module::Build can easily do it to. Since everyone is lazy http://cpansearch.perl.org/src/ADAMK/Module-Install-0.88/lib/Module/Install/Share.pm
Re: setting up a file hierarchy
On Tue, May 19, 2009 at 05:19:16PM +0100, David Cantrell wrote: > > On Tue, May 19, 2009 at 04:50:06PM +0100, Chisel Wright wrote: > > On Tue, May 19, 2009 at 04:33:06PM +0100, David Cantrell wrote: > > > I'll pay attention when it doesn't rely on Module::Install. > > Should I ask why? > > Would you like to install mandatory pre-requisite Foo::Bar for this > 'ere module what you told the comptuer to install? Y/n I think we're supposed to believe that everyone somehow knows to set the correct environment variable to deal with this. The environment variable exists, and it's documented. And we should all somehow find the right documentation, and if we consider it sufficiently annoying, patch the code or stop whining about backwards incompatibility. I worry about things like Modern Perl and Enlightened Perl, not because I want to remain stuck in the past, but because I worry about how we convey fundamental changes to Perl users outside our clique. Sometimes the word "Schumpeter" sounds like an elephant trampling everyone to death. Sorry, I don't have any constructive advice here other than that the constructive advice we offer should remain helpful in future, lest we eventualy alienate those we briefly appeal to. We've taught people how to use CPAN, then thrown away our credibility with Module::Install. Please replace the elephant, and grope it again. I feel fortunate to belong with the in-crowd that can ask the right people for help. Consequently, I've managed to make Module::Install behave how I want. People outside our clique won't know who to ask and won't readily get such helpful answers. Tom
Re: setting up a file hierarchy
On Tue, May 19, 2009 at 04:02:19PM +0200, Jurgen Pletinckx wrote: > A .docx file is just a zip container with a handful of XML > documents (plus extra media, if applicable). For most of these, the > default content is fine. But what is the optimal way of generating > them? ... > I set up the hierarchy in a folder, and package that up with > Archive::Zip, as it makes interactions with the files easier. I could > write directly into a zip file, but that doesn't really make a > difference to the problem. I think I'd use Template Toolkit's ttree to build the internal structure, then package that with Archive::Zip as you suggest. That seems cleaner to me than a script with lots of <
Re: setting up a file hierarchy
On Tue, May 19, 2009 at 04:50:06PM +0100, Chisel Wright wrote: > On Tue, May 19, 2009 at 04:33:06PM +0100, David Cantrell wrote: > > I'll pay attention when it doesn't rely on Module::Install. > Should I ask why? Would you like to install mandatory pre-requisite Foo::Bar for this 'ere module what you told the comptuer to install? Y/n Would you like to install mandatory pre-requisite Baz::Barf for this 'ere module what you told the comptuer to install? Y/n Would you like to install mandatory pre-requisite Quux::Garbleflux for this 'ere module what you told the comptuer to install? Y/n -- David Cantrell | http://www.cantrell.org.uk/david You are so cynical. And by "cynical", of course, I mean "correct". -- Kurt Starsinic
Re: setting up a file hierarchy
On Tue, May 19, 2009 at 04:33:06PM +0100, David Cantrell wrote: > I'll pay attention when it doesn't rely on Module::Install. Should I ask why? -- Chisel Wright e: chi...@herlpacker.co.uk w: http://www.herlpacker.co.uk/ I like to photograph people naked, but they usually ask me to get dressed again as it's not a pretty sight.
Re: setting up a file hierarchy
On Tue, May 19, 2009 at 04:22:29PM +0100, Ash Berlin wrote: > http://search.cpan.org/~adamk/File-ShareDir-1.00/lib/File/ShareDir.pm > was created for this very purpose. I'll pay attention when it doesn't rely on Module::Install. -- header FROM_DAVID_CANTRELLFrom =~ /david.cantrell/i describe FROM_DAVID_CANTRELLMessage is from David Cantrell scoreFROM_DAVID_CANTRELL15.72 # This figure from experimentation
Re: setting up a file hierarchy
On Tue, 19 May 2009 16:12:08 +0100, Dave Cross wrote: > David Cantrell wrote: >> On Tue, May 19, 2009 at 04:02:19PM +0200, Jurgen Pletinckx wrote: >> >>> So. Any prior art? How should one treat non-code dependencies? >> >> In a __DATA__ segment. If you need more than one file, bundle them up >> as blobs in a database in that segment, or put a zip/tarball there. > > Does anyone still use Inline::Files? > >http://search.cpan.org/dist/Inline-Files/ > > Dave... http://search.cpan.org/~adamk/File-ShareDir-1.00/lib/File/ShareDir.pm was created for this very purpose.
Re: setting up a file hierarchy
David Cantrell wrote: On Tue, May 19, 2009 at 04:02:19PM +0200, Jurgen Pletinckx wrote: So. Any prior art? How should one treat non-code dependencies? In a __DATA__ segment. If you need more than one file, bundle them up as blobs in a database in that segment, or put a zip/tarball there. Does anyone still use Inline::Files? http://search.cpan.org/dist/Inline-Files/ Dave...
Re: setting up a file hierarchy
On Tue, May 19, 2009 at 04:02:19PM +0200, Jurgen Pletinckx wrote: > So. Any prior art? How should one treat non-code dependencies? In a __DATA__ segment. If you need more than one file, bundle them up as blobs in a database in that segment, or put a zip/tarball there. -- David Cantrell | A machine for turning tea into grumpiness Erudite is when you make a classical allusion to a feather. Kinky is when you use the whole chicken.
setting up a file hierarchy
Please help me do my homework :) I've got a module which creates .docx files. Those are Microsoft's latest Word format, as described in the OOXML standard. OOXML is not too gruesome to work with, and I'm having a great time stuffing my reports with figures and tables and whatnot. However, one very smelly piece of code is the creation of a new document. A .docx file is just a zip container with a handful of XML documents (plus extra media, if applicable). For most of these, the default content is fine. But what is the optimal way of generating them? I currently find myself doing a lot of "mkdir"s and "print OUT