[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Stow-devel] Stow 2.0.x release requirements
From: |
Kahlil Hodgson |
Subject: |
Re: [Stow-devel] Stow 2.0.x release requirements |
Date: |
Wed, 23 Nov 2011 11:02:18 +1100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111108 Fedora/3.1.16-1.fc14 Lightning/1.0b3pre Thunderbird/3.1.16 |
Hi Adam,
On 20/11/11 22:29, Adam Spiers wrote:
> Good news! I've finished split the core code off into two new
> modules: Stow.pm and Stow/Util.pm. I'm quite pleased that the process
> of separating the frontend from the backend seems to have resulted in
> some nice clean code - hope you agree when you see it.
>
> Stow.pm provides a nice object-oriented interface, e.g.
>
> my $stow = new Stow(%$options);
>
> $stow->plan_unstow(@pkgs_to_unstow);
> $stow->plan_stow (@pkgs_to_stow);
>
> my @conflicts = $stow->get_conflicts;
> $stow->process_tasks() unless @conflicts;
>
> This enabled a *huge* reduction in the number of global variables.
> All the options and state (@Tasks, @Conflicts etc.) are now stored
> inside a Stow object instance. This made for cleaner tests -
> reset_state() is now obsolete, since to reset state you simply
> instantiate a new Stow object.
Very Nice :-)
> After modifying the whole test suite to this new interface, I was able
> to introduce 'use strict' and 'use warnings' to all the tests, and
> 'make test' now passes 100% again :-)
Excellent!
> Latest code is available here:
>
> https://github.com/aspiers/stow/
Hope to get a chance to check it out soon. A little busy with work ATM.
> and also adding Module::Build support so that we can easily make CPAN
> releases.
There be dragons. The older MakeMaker stuff may be easier.
> I'm hoping that this will co-exist peacefully with the
> autotools-based build system, although I'm currently puzzling over how
> to cope with installation of the modules. Module::Build expects them
> to be under lib/, but if I put this in Makefile.am:
>
> pmdir = $(libdir)/perl5
> nobase_pm_DATA = lib/Stow.pm lib/Stow/Util.pm
>
> then autotools installs them to lib/perl5/lib/Stow* which is not
> right :-/
Getting the original autotools stuff to work really did my head in. Had
to read a lot of documentation just to do something very simple.
I believe I may have forgotten almost everything I once new about the
autotools framework now :-(
Good Luck!
Kal
- Re: [Stow-devel] Stow 2.0.x release requirements, Adam Spiers, 2011/11/15
- Re: [Stow-devel] Stow 2.0.x release requirements, Adam Spiers, 2011/11/15
- Re: [Stow-devel] Stow 2.0.x release requirements, Kahlil Hodgson, 2011/11/16
- Re: [Stow-devel] Stow 2.0.x release requirements, Adam Spiers, 2011/11/16
- Re: [Stow-devel] Stow 2.0.x release requirements, Adam Spiers, 2011/11/16
- Re: [Stow-devel] Stow 2.0.x release requirements, Adam Spiers, 2011/11/20
- Re: [Stow-devel] Stow 2.0.x release requirements,
Kahlil Hodgson <=
- Re: [Stow-devel] Stow 2.0.x release requirements, Adam Spiers, 2011/11/23
- Re: [Stow-devel] Stow 2.0.x release requirements, Alexei Znamensky, 2011/11/23
- Re: [Stow-devel] Stow 2.0.x release requirements, Karl Berry, 2011/11/23