15:36 right. so the first thing to do is probably write a test to check generating an application doesn't change. 15:37 per app? 15:38 no, I mean whilst you're ripping ::Helper apart. 15:38 OH 15:38 gotcha 15:38 if you install your branch.. Then catalyst.pl t/TestAppForComparison 15:39 so we have the same results now as before, yes? 15:39 then you write a test which says catalyst.pl /tmp/TempTestApp; my $diff = `diff -urN t/TestAppForComparison /tmp/TempTestApp`; ok !length($diff) or warn $diff; 15:40 exactly. and that'll test you rip all of the files out of Helper.pm correctly.. 15:40 okay, TestAppForComparison created. i'll commit that initial version 15:40 you'll probably want to nuke it after that, as testing the generated strings of an entire app dir is gonna be a PITA 15:41 to maintain 15:41 i could see that 15:41 But it's totally the right solution whilst you're trying to rip stuff out without changing it 15:41 temp testing :-D 15:44 I've got some ideas on doing better testing that the TestApp we generate is good. 15:44 but they're a bit more involved, and not needed for this at all ;) 15:45 this being this refactor, or this bit of the refactor? 15:45 the latter. 15:45 okay - got it 15:46 and once this is done - you can branch again to work on the code, and again to work on the generated app templates (as we'll want to moosify those, so your app is moosetastic by default 15:46 and as it's all in different files - you can do both in parallel as you feel like and safely merge back 15:47 did you get to grips with MX::GetOpt and do you have a plan for that yet? 15:48 so one branch for helper_refactor, one for code (which code?), and one for app templates 15:48 As I guess catalyst.pl should be taught to use it, and so should the generated scripts :) 15:48 i've been playing with MX::GetOpt, i need a few more details on what exactly needs to be beat up 15:48 yy, but you branch from completed helper_refactor :) 15:49 and 'code' is the actual refactor / api changes for helpers 15:49 bletch 15:50 okay, so the 'code' branch will be simply the C::H code branched from helper_refactor 15:50 get_file has to keep working as everything using ::Helper needs it 15:50 yes, exactly. 15:51 so you need to make a get_file_from_sharedir function or something 15:51 okay, making sense now :-) 15:51 and change things over to use that. 15:51 that's fine though - means you can extract 1 file at a time 15:52 which would be better, no? better atomicity and for testing 15:52 yy 15:52 bletch was at the fact that 'get_file' is a good method name, and it's now deprecated 15:53 is that in C::H? 15:53 yy 15:53 * dhoss is a little behind in my api knowledge 15:53 off the top of my head at least 15:53 it's the 'get me a file out the section' method 15:53 aha right 15:54 which you're replacing in favour of 'get me a file out of the share dir' 15:54 and 'copy file out of sharedir' methods. 15:54 The former for templates 15:54 the latter for binaries, which gets rid of the hateful decoding and writing out business 15:54 get -> we're going to interpolate shit, copy -> we're giong to use directly? 15:55 just so 15:55 eliminating the 'please turn this giant hex string back into binary' thing 15:55 definitely :-P 16:00 sub _mk_favicon { 16:00 my ( $self ) = @_; 16:00 $self->copy_share_file( 16:00 File::Spec->catfile( ( caller(0) )[0], 'favicon.ico' ), 16:00 File::Spec->catfile( $self->{root}, "favicon.ico" ) 16:00 ); 16:00 } 16:00 sumfin like dat 16:01 easy enough 16:01 the actually, all the caller crap dies too 16:02 hrm, i suppose we have to keep the atrocious Class::Accessor::Fast method name artifacts? 16:02 that's to clue get_file what file to borg crap out off 16:03 I vote that most of them can burn, as we'll be working out what shit to copy a lot more dynamically 16:03 and the ones which can't get deprecated, but preserved. 16:04 so that's just for the current get_file, right? 16:04 yy ######################################################################## ## done 16:04 $self->copy_share_file( 16:04 'favicon.ico', 16:04 File::Spec->catfile( $self->{root}, "favicon.ico" ) 16:04 ); ######################################################################### 16:05 more like it 16:05 so we have sub mk_foo { shift->generate_foo(@_); } ==== 5-28 03:04 < dhoss> SO. official next step: 1) #done trim crap out 2) write test for how helpers are invoking Catalyst::Helper 3)??? 4) profit! 03:05 < t0m> 3) Re arrange files in sharedir so we can make the comversion guts totally generic 03:05 < t0m> 4) merge&profit 03:05 < t0m> *conversion 03:05 < dhoss> rearrange meaning mv foo MyApp? 03:06 < t0m> erm, yes, as described above, so that the contents of share/ is laid out the same as a newly generated MyApp 03:06 < dhoss> OH 03:06 < dhoss> okay 03:06 < dhoss> instead of my current fuckery :-) 03:06 < dhoss> autarch: btw if you have an idea for that i'd love an email to the one in topic 03:06 < t0m> cause then the entire generate application becomes 'copy this directory from X => Y, applying some file mangling rules)