in reply to Simple indentation. Does it need improvement?

Hi siberia-man,

I would advise you against using new in this context because it looks like an object constructor (and you module is not object-oriented).

Below are some further comments after a very quick look at your code (but maybe I looked at it to quickly).

If you made your module subroutine names a bit more specific, you could export them with a more limited risk of a name clash and then you could use them without having to prefix them with indent::. I would clearly be reluctant to use a module where I have to prefix all my sub calls with the module name. And, BTW, the module name should rather be Indent, with a leading capital letter. Do you really have to use the magical goto construct where, it seems to me, a simple function call would do?

That's an implementation detail, but if I were to write such a module, I think I would rather implement the current indentation as a simple scalar variable recording the indentation level, e.g. 0 for no indentation, 1 for the first level, etc., and then just increment or decrement that variable when changing indentation level, rather than having an array of strings with push and pop operations. But that is really a detail, nobody really cares.