Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Avoid breaking code that uses Reflex::Trait::Observed.

Add a Reflex::Trait::Observed that's implemented by
Reflex::Trait::Watched.  This is a temporary plceholder to avoid
upgrade awkwardness.  It'll go away in a few releases of Reflex.
  • Loading branch information...
commit 18c07d9577fb4e77d0bef4ecb680c31277a6beea 1 parent 354b571
@rcaputo authored
Showing with 54 additions and 0 deletions.
  1. +54 −0 lib/Reflex/Trait/Observed.pm
View
54 lib/Reflex/Trait/Observed.pm
@@ -0,0 +1,54 @@
+package Reflex::Trait::Observed;
+use Moose::Role;
+with qw(Reflex::Trait::Watched);
+
+use Moose::Exporter;
+Moose::Exporter->setup_import_methods( with_caller => [ qw( observes ) ]);
+
+warn(
+ "[ Reflex::Trait::Observed is deprecated. ]\n",
+ "[ Please use Reflex::Trait::Watched instead. ]\n",
+);
+
+sub observes { goto \&watches }
+
+package Moose::Meta::Attribute::Custom::Trait::Reflex::Trait::Observed;
+sub register_implementation { 'Reflex::Trait::Observed' }
+
+1;
+
+__END__
+
+=head1 NAME
+
+Reflex::Trait::Observed - Automaticall watch Reflex objects.
+
+=head1 SYMOPSIS
+
+See L<Reflex::Trait::Watched>.
+
+=head1 DESCRIPTION
+
+First, this trait is deprecated. Please use Reflex::Trait::Watched
+instead.
+
+This trait exists for backwards compatibility, allowing existing code
+to use Reflex::Trait::Watched by its old name. New code should use
+Reflex::Trait::Watched directly.
+
+=head1 SEE ALSO
+
+L<Reflex>
+L<Reflex::Trait::Watched>
+
+L<Reflex/ACKNOWLEDGEMENTS>
+L<Reflex/ASSISTANCE>
+L<Reflex/AUTHORS>
+L<Reflex/BUGS>
+L<Reflex/BUGS>
+L<Reflex/CONTRIBUTORS>
+L<Reflex/COPYRIGHT>
+L<Reflex/LICENSE>
+L<Reflex/TODO>
+
+=cut
Please sign in to comment.
Something went wrong with that request. Please try again.