profile class assertion
matthewt [Sat, 15 Sep 2007 23:08:43 +0000 (23:08 +0000)]
git-svn-id: http://dev.catalyst.perl.org/repos/bast/trunk/Devel-REPL@3748 bd8105ee-0ff8-0310-8827-fb3f25b6796d

lib/Devel/REPL/Script.pm

index 277fc91..bf36136 100644 (file)
@@ -32,6 +32,8 @@ sub load_profile {
   my ($self, $profile) = @_;
   $profile = "Devel::REPL::Profile::${profile}" unless $profile =~ /::/;
   Class::MOP::load_class($profile);
+  confess "Profile class ${profile} doesn't do 'Devel::REPL::Profile'"
+    unless $profile->does('Devel::REPL::Profile');
   $profile->new->apply_profile($self->_repl);
 }