Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Module-Starter CPAN distribution.

Report information
The Basics
Id: 12017
Status: open
Priority: 0/
Queue: Module-Starter

People
Owner: Nobody in particular
Requestors: sagarshah [...] softhome.net
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: Better templating support
Module::Starter is great, very useful but it could be even more useful. Here are some ideas for when a user is using a template directory (and perhaps even an inline template set): * Where a standard file is missing from the directory (e.g. .cvsignore) then that file is not cretated - currently a 0 byte file of that name is created. I would find this useful because i use subversion and choose to name my ignore files .svnignore rather than .cvsignore * Where a file is in the template directory but Module::Starter doesn't know about it, the file should just be processed like any other file and just placed in the target directory. (e.g. I can place a MANIFEST.SKIP in my template directory and this will be copied through, i can add a T::D test into the t/ directory and this will be copied through etc. etc.) I think by adding these features it will make Module::Starter even more flexible and give fewer people a reason not to use it. I'm happy to look at providing a patch if you're busy and are upfront about what guidlines i'll have to stick to for the patch to be accepted
I agree with your comments, and want to address them soon.
From: sjn+perlbug [...] pvv.org
On Ons. 06. Jul. 2005 22:23:20, RJBS wrote: Show quoted text
> I agree with your comments, and want to address them soon.
How are things going with this? I'd like to see this kind of support too... Right now I'm overriding create_MANIFEST with this (which, obviously, isn't a solution that should be necessary when using an open source tool.) ==============================8<------------------------ package Module::Starter::Plugin::Template::ManifestSkip; sub create_MANIFEST { my $self = shift; my @files = @_; push(@files, $self->create_MANIFEST_SKIP() ); $self->SUPER::create_MANIFEST(@files); } sub create_MANIFEST_SKIP { my $self = shift; my $fname = File::Spec->catfile( $self->{basedir}, "MANIFEST.SKIP" ); open( my $fh, ">", $fname ) or die "Can't create $fname: $!\n"; print $fh $self->MANIFEST_SKIP_guts(); close $fh; $self->progress( "Created $fname" ); return "MANIFEST.SKIP"; } sub MANIFEST_SKIP_guts { my $self = shift; my %options; my $template = $self->{templates}{"MANIFEST.SKIP"}; $self->render($template, \%options); } --------------------->8================================== A more general solution for adding files would be GREATLY appreciated! (hint, hint :)
This issue has been copied to: https://github.com/xsawyerx/module-starter/issues/26. Please take all future correspondence there. This ticket will remain open but please do not reply here. This ticket will be closed when the github issue is dealt with. On Mon Sep 04 07:49:33 2006, sjn wrote: Show quoted text
> On Ons. 06. Jul. 2005 22:23:20, RJBS wrote:
> > I agree with your comments, and want to address them soon.
> > How are things going with this? I'd like to see this kind of support too... > > Right now I'm overriding create_MANIFEST with this (which, obviously, > isn't a solution that should be necessary when using an open source tool.) > > ==============================8<------------------------ > package Module::Starter::Plugin::Template::ManifestSkip; > > sub create_MANIFEST { > my $self = shift; > my @files = @_; > > push(@files, $self->create_MANIFEST_SKIP() ); > > $self->SUPER::create_MANIFEST(@files); > } > > sub create_MANIFEST_SKIP { > my $self = shift; > > my $fname = File::Spec->catfile( $self->{basedir}, "MANIFEST.SKIP" ); > open( my $fh, ">", $fname ) or die "Can't create $fname: $!\n"; > print $fh $self->MANIFEST_SKIP_guts(); > close $fh; > > $self->progress( "Created $fname" ); > > return "MANIFEST.SKIP"; > } > > sub MANIFEST_SKIP_guts { > my $self = shift; > my %options; > > my $template = $self->{templates}{"MANIFEST.SKIP"}; > $self->render($template, \%options); > } > --------------------->8================================== > > A more general solution for adding files would be GREATLY appreciated! > (hint, hint :)