Skip to content

Commit

Permalink
converted to Dist::Zilla
Browse files Browse the repository at this point in the history
* converted to Dist::Zilla
* a little bit of PODs
  • Loading branch information
Vyacheslav Matjukhin authored and druxa committed Oct 8, 2010
1 parent d63a68e commit 5d4c0a1
Show file tree
Hide file tree
Showing 21 changed files with 135 additions and 12 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/.debuild
/Morpheus-*
/.build
5 changes: 5 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Revision history for Morpheus

{{$NEXT}}
* converted to Dist::Zilla
* a little bit of PODs
File renamed without changes.
4 changes: 2 additions & 2 deletions bin/morph
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/perl
# vim: ft=perl

=head1 NAME
package morph;

morph - Morpheus configuration tree dumper.
# ABSTRACT: Morpheus configuration tree dumper.

=head1 SYNOPSIS
Expand Down
7 changes: 7 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
libmorpheus-perl (0.30) stable; urgency=low

* converted to Dist::Zilla
* a little bit of PODs

-- Vyacheslav Matjukhin (No comments) <[email protected]> Fri, 08 Oct 2010 20:11:09 +0400

libmorpheus-perl (0.2.16) stable; urgency=low

* PPB bootstrapper moved to a separate package
Expand Down
58 changes: 56 additions & 2 deletions debian/rules
Original file line number Diff line number Diff line change
@@ -1,4 +1,58 @@
#!/usr/bin/make -f

include /usr/share/cdbs/1/class/makefile.mk
include /usr/share/cdbs/1/class/ppb.mk
PACKAGE=$(shell dh_listpackages)

ifndef PERL
PERL = /usr/bin/perl
endif

TMP =$(CURDIR)/debian/tmp

build: debian/build-stamp
debian/build-stamp:
dh_testdir
$(PERL) Makefile.PL INSTALLDIRS=vendor \
INSTALLVENDORARCH=/usr/share/perl5/ \
VENDORARCHEXP=/usr/share/perl5/
$(MAKE)
$(MAKE) test
touch $@

clean:
dh_testdir
dh_testroot
dh_clean debian/build-stamp debian/install-stamp
[ ! -f Makefile ] || $(MAKE) realclean

install: debian/install-stamp
debian/install-stamp: debian/build-stamp
dh_testdir
dh_testroot
dh_clean -k
$(MAKE) install DESTDIR=$(TMP) PREFIX=/usr
rm -rf $(TMP)/usr/lib/perl/5.8/
touch $@

binary-arch:
# We have nothing to do here for an architecture-independent package

binary-indep: build install
dh_testdir
dh_testroot
dh_installdocs README
dh_installexamples
dh_installchangelogs Changes
dh_installdirs
dh_installcron
dh_installlogrotate
dh_install --sourcedir=debian/tmp
dh_perl
dh_compress
dh_fixperms
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary
26 changes: 26 additions & 0 deletions dist.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name = Morpheus
version = 0.30
author = Andrei Mishchenko <[email protected]>
license = Perl_5
copyright_holder = Yandex LLC

[PodWeaver]

[@Filter]
bundle = @Classic
remove = PodVersion

[AutoPrereq]

[NextRelease]
format = %-7v %{eee MMM dd, yyyy}d

[MetaResources]
homepage = http://github.com/druxa/morpheus/wiki
bugtracker.web = http://github.com/druxa/morpheus/issues
bugtracker.mailto = [email protected]
repository.url = git://github.com/druxa/morpheus.git
repository.web = http://github.com/druxa/morpheus
repository.type = git

[@Git]
11 changes: 5 additions & 6 deletions lib/Morpheus.pm
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ use strict;
sub morph ($;$);
sub export ($$;$);

=head1 NAME
Morpheus - the ultimate configuration engine
# ABSTRACT: the ultimate configuration engine

=head1 SYNOPSIS
Expand Down Expand Up @@ -36,12 +34,13 @@ Morpheus - the ultimate configuration engine
=head1 DESCRIPTION
Morph it!
Morpheus is a configuration engine that supports custom plugins. It allows any
program that uses it to be configured and reconfigured at different layers
like local configuration files, configuration database, environment, etc.
The overall program configuration is merged altogether from all these sources.
=cut

our $VERSION = '{{DEBIAN_VERSION}}';

sub import ($;@) {
my $class = shift;
my ($caller) = caller;
Expand Down
2 changes: 2 additions & 0 deletions lib/Morpheus/Bootstrap.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ package Morpheus::Bootstrap;
use strict;
use warnings;

# ABSTRACT: initial morpheus plugin which loads all other plugins

use Morpheus::Plugin::Simple;

our $BOOTSTRAP_PATH;
Expand Down
3 changes: 2 additions & 1 deletion lib/Morpheus/Bootstrap/Extra.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ package Morpheus::Bootstrap::Extra;
use strict;
use warnings;

# ABSTRACT: extra plugins - Env and File

use Morpheus::Plugin::Env;
#use Morpheus::Plugin::DB;
use Morpheus::Plugin::File;
use Morpheus::Plugin::Core;

Expand Down
2 changes: 2 additions & 0 deletions lib/Morpheus/Bootstrap/Vital.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ package Morpheus::Bootstrap::Vital;
use strict;
use warnings;

# ABSTRACT: bootstrap enabling Overrides and Defaults functionality

use Morpheus::Overrides;
use Morpheus::Defaults;

Expand Down
3 changes: 3 additions & 0 deletions lib/Morpheus/Defaults.pm
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package Morpheus::Defaults;
use strict;

# ABSTRACT: plugin for defining configuration from perl code

use base qw(Morpheus::Overrides);

our $cache = {};
Expand Down
3 changes: 3 additions & 0 deletions lib/Morpheus/Key.pm
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package Morpheus::Key;
use strict;

# ABSTRACT: class representing config key

use overload
'eq' => sub { @_ = upgrade(@_); ${$_[0]} eq ${$_[1]} },
'lt' => \&less,
Expand Down
3 changes: 3 additions & 0 deletions lib/Morpheus/Overrides.pm
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package Morpheus::Overrides;
use strict;

# ABSTRACT: plugin for overriding configuration from perl code

use Morpheus::Utils qw(merge normalize);

our $cache = {};
Expand Down
4 changes: 3 additions & 1 deletion lib/Morpheus/Plugin/Content.pm
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package Morpheus::Plugin::Content;
# base class for plugins that evaluate user defined perl configs

# ABSTRACT: base class for plugins that evaluate user defined perl configs

use strict;

use Morpheus::Utils qw(normalize);
Expand Down
2 changes: 2 additions & 0 deletions lib/Morpheus/Plugin/Core.pm
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package Morpheus::Plugin::Core;
use strict;

# ABSTRACT: plugin providing some core constants

use Sys::Hostname;

use Morpheus::Plugin::Simple;
Expand Down
2 changes: 2 additions & 0 deletions lib/Morpheus/Plugin/DB.pm
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package Morpheus::Plugin::DB;
use strict;

# ABSTRACT: plugin reading configs from SQL DB

use base qw(Morpheus::Plugin::Content);

use DBI;
Expand Down
2 changes: 2 additions & 0 deletions lib/Morpheus/Plugin/Env.pm
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package Morpheus::Plugin::Env;
use strict;

# ABSTRACT: plugin which provides config values based on MORPHEUS env variable

use base qw(Morpheus::Plugin::Content);

sub list ($$) {
Expand Down
2 changes: 2 additions & 0 deletions lib/Morpheus/Plugin/File.pm
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package Morpheus::Plugin::File;
use strict;

# ABSTRACT: plugin reading perl-based configs

use base qw(Morpheus::Plugin::Content);

use Morpheus;
Expand Down
3 changes: 3 additions & 0 deletions lib/Morpheus/Plugin/Simple.pm
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
package Morpheus::Plugin::Simple;
use strict;
use warnings;

# ABSTRACT: plugin for simple static configuration

use Morpheus::Utils qw(normalize);

sub new ($$) {
Expand Down
2 changes: 2 additions & 0 deletions lib/Morpheus/Utils.pm
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package Morpheus::Utils;
use strict;

# ABSTRACT: some common functions which don't fit anywhere else

sub normalize ($);
sub adjust ($$);
sub merge ($$;$);
Expand Down

0 comments on commit 5d4c0a1

Please sign in to comment.