]> git.ipfire.org Git - thirdparty/automake.git/commit
[ng] refactor: support comments only for VarDef, not for ItemDef too
authorStefano Lattarini <stefano.lattarini@gmail.com>
Wed, 2 May 2012 23:08:29 +0000 (01:08 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Fri, 25 May 2012 08:58:29 +0000 (10:58 +0200)
commitcec1b21efba4556267776609e0c308181426387c
tree6851dc51f3be7064a038ba81e4faa501b62bb1ad
parent59ed7bff3f897cfc8dcc8c60abd2dbbacbdd56c4
[ng] refactor: support comments only for VarDef, not for ItemDef too

Comments are actually handled and used for variable definitions only,
so no point in handling it also for rule definitions.  And this will
simplify our next step where we change how variable definitions (and
related comments) are stored and displayed.

* lib/Automake/ItemDef.pm (new): Don't take a $comment argument
anymore, and don't set a $self->{comment} field in the returned
object.
(comment): Remove this accessor method.
(Pod documentation): Adjusted.
* lib/Automake/Rule.pm (define): Don't pass a $comment argument
to the Automake::RuleDef constructor anymore.  No real loss here,
since we were unconditionally passing an empty comment anyway.
* lib/Automake/RuleDef.pm (new): Don't take a $comment argument
anymore, and don't pass it to the Automake::ItemDef constructor.
(Pod documentation): Adjusted.
* lib/Automake/VarDef.pm (new): Directly store the $comment
argument in the $self->{comment} field.  Don't pass the
Automake::ItemDef constructor anymore.
(comment): New accessor method (it is no more inherited from
Automake::ItemDef anymore).

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
lib/Automake/ItemDef.pm
lib/Automake/Rule.pm
lib/Automake/RuleDef.pm
lib/Automake/VarDef.pm