Skip to content
Browse files

improved portability

  • Loading branch information...
1 parent 488675a commit 5ddbdcc015bbb3d174835c3a233528d184b4eeb1 @yuki-kimoto committed Feb 15, 2011
Showing with 18 additions and 7 deletions.
  1. +2 −0 Changes
  2. +13 −5 lib/Object/Simple.pm
  3. +2 −1 lib/Object/Simple/Accessor.pm
  4. +1 −1 lib/Object/Simple/Guide/Ja.pod
View
2 Changes
@@ -1,3 +1,5 @@
+3.0620
+ improved portability
3.0619
improved error message
3.0618
View
18 lib/Object/Simple.pm
@@ -1,9 +1,10 @@
package Object::Simple;
-our $VERSION = '3.0619';
+our $VERSION = '3.0620';
use strict;
use warnings;
+no warnings 'redefine';
use Carp ();
@@ -136,10 +137,17 @@ $code = sub {
}
}
-# Deprecated methods
-use Object::Simple::Accessor;
-sub class_attr { Object::Simple::Accessor::create_accessors('class_attr', @_) }
-sub dual_attr { Object::Simple::Accessor::create_accessors('dual_attr', @_) }
+
+# DEPRECATED!
+sub class_attr {
+ require Object::Simple::Accessor;
+ Object::Simple::Accessor::create_accessors('class_attr', @_)
+}
+
+sub dual_attr {
+ require Object::Simple::Accessor;
+ Object::Simple::Accessor::create_accessors('dual_attr', @_)
+}
=head1 NAME
View
3 lib/Object/Simple/Accessor.pm
@@ -340,5 +340,6 @@ sub inherit_attribute {
=head1 NAME
-Object::Simple::Accessor - Deprecated
+Object::Simple::Accessor - DEPRECATED!
+=cut
View
2 lib/Object/Simple/Guide/Ja.pod
@@ -333,7 +333,7 @@ SUPER擬似クラスを使用します。
=head2 3. よく利用するテクニック
-=head3 Override new()メソッドのオーバーライド
+=head3 new()メソッドのオーバーライド
C<new()>メソッドは必要ならばオーバーライドすることができます。

0 comments on commit 5ddbdcc

Please sign in to comment.
Something went wrong with that request. Please try again.