[Bps-public-commit] App-Changeloggr branch, master, updated. c786ab8e5b8a35f7d2003117674587252d4e4f1e

sartak at bestpractical.com sartak at bestpractical.com
Thu Mar 26 18:29:15 EDT 2009


The branch, master has been updated
       via  c786ab8e5b8a35f7d2003117674587252d4e4f1e (commit)
      from  f0f2b2588df69c076303d5d00a45ac67bce322e1 (commit)

Summary of changes:
 lib/App/Changeloggr/Model/ChangesCollection.pm |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

- Log -----------------------------------------------------------------
commit c786ab8e5b8a35f7d2003117674587252d4e4f1e
Author: Shawn M Moore <sartak at gmail.com>
Date:   Thu Mar 26 18:28:57 2009 -0400

    Reflection over changelog format

diff --git a/lib/App/Changeloggr/Model/ChangesCollection.pm b/lib/App/Changeloggr/Model/ChangesCollection.pm
index f6c4b93..d314385 100644
--- a/lib/App/Changeloggr/Model/ChangesCollection.pm
+++ b/lib/App/Changeloggr/Model/ChangesCollection.pm
@@ -34,9 +34,19 @@ sub create_from_text {
 sub extract_change_data_from_text {
     my $self = shift;
     my $text = shift;
-    my %fields;
 
+    my $format = App::Changeloggr->identify_format($text);
+    die "I'm unable to handle the change text format."
+        if !defined($format);
+
+    my $extract_method = "extract_change_data_from_$format";
+    return $self->$extract_method($text);
+}
 
+sub extract_change_data_from_git {
+    my $self = shift;
+    my $text = shift;
+    my %fields;
 
     return (\%fields, $text);
 }

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list