Closed moollaza closed 10 years ago
We should provide an explanation of the what name is for (i.e. it will become the filename) and we should tell them it should be CamelCased and it shouldn't contain any spaces
@moollaza I think it would be better if we abstracted away the camel-casing from the user:
"the walking dead" => "TheWalkingDead.pm" and "the_walking_dead.js" "thewalkingdead" => "Thewalkingdead.pm" and "thewalkingdead.js" "the_walking_dead" => "TheWalkingDead.pm" and "the_walking_dead.js" "The Walking dead" => "TheWalkingDead.pm" and "the_walking_dead.js"
There might be other input variations that I forgot. Any invalid characters in the string would be rejected / escaped.
@moollaza is it possible to remove the extra newlines from the output?
@jagtalon if we're going to abstract it then I think we would have to confirm with them the text that is going to be used -- I don't like the idea of magically modifying their input. IMHO it makes the most sense to force them to choose an appropriate package name, or pull out spaces from the name and CamelCase that appropriately to create the name -- any errors should cause a reprompt so we don't create move forward with a name the dev doesn't want/like.
FWIW I think it might be a little easier to use a prompt lib like https://metacpan.org/pod/IO::Prompt to make all this easier -- cc// @DavidMascio
Fixed with #110
@moollaza Fair enough. As long as it errors out for invalid input is what matters.