r270@brr: dpavlin | 2007-11-25 21:14:10 +0100
authorDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 25 Nov 2007 20:33:12 +0000 (20:33 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 25 Nov 2007 20:33:12 +0000 (20:33 +0000)
 export $debug

git-svn-id: https://perl-cwmp.googlecode.com/svn/trunk@228 836a5e1a-633d-0410-964b-294494ad4392

lib/CWMP/Store/HASH.pm
lib/CWMP/Store/JSON.pm
lib/CWMP/Store/YAML.pm

index 87bec30..fed4495 100644 (file)
@@ -3,6 +3,11 @@ package CWMP::Store::HASH;
 use strict;
 use warnings;
 
+use Exporter 'import';
+our @EXPORT = qw/
+       $debug
+/;
+
 use Data::Dump qw/dump/;
 use Hash::Merge qw/merge/;
 use Carp qw/confess/;
index 6a80bdf..43b1d44 100644 (file)
@@ -20,14 +20,14 @@ my $full_path;
 sub full_path {
        my ( $self, $path ) = @_;
        $full_path = "$path/json";
-       warn "## full_path: $full_path";
+       warn "## full_path: $full_path" if $debug;
        return $full_path;
 }
 
 sub file {
        my ( $self, $uid ) = @_;
        my $file = "$full_path/$uid" . $self->extension;
-       warn "## file -> $file";
+       warn "## file -> $file" if $debug;
        return $file;
 }
 
index a523443..7be49ee 100644 (file)
@@ -20,14 +20,14 @@ my $full_path;
 sub full_path {
        my ( $self, $path ) = @_;
        $full_path = "$path/yaml";
-       warn "## full_path: $full_path";
+       warn "## full_path: $full_path" if $debug;
        return $full_path;
 }
 
 sub file {
        my ( $self, $uid ) = @_;
        my $file = "$full_path/$uid" . $self->extension;
-       warn "## file -> $file";
+       warn "## file -> $file" if $debug;
        return $file;
 }