Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

We are not croaking when the plugin fails. #2

Open
wants to merge 1 commit into from

1 participant

Tim Heaney
Tim Heaney

I think the croaks that follow do the right thing, but they're not getting the information they need.

$ perl -MMusic::Tag -E 'Music::Tag->new(shift) and say "why are we here?"' foo.mp7
Music::Tag::Auto Sorry, I can't find a plugin for /home/tim/foo.mp7 at /home/tim/perl5/perlbrew/perls/perl-5.12.4/lib/site_perl/5.12.4/Music/Tag.pm line 146
why are we here?

Tim Heaney We are not croaking when the plugin fails.
$ perl -MMusic::Tag -E 'Music::Tag->new(shift) and say "why are we here?"' foo.mp7
Music::Tag::Auto Sorry, I can't find a plugin for /home/tim/foo.mp7 at /home/tim/perl5/perlbrew/perls/perl-5.12.4/lib/site_perl/5.12.4/Music/Tag.pm line 146
why are we here?
0be6af6
Tim Heaney

I made that change to a different Perl...

$ perlbrew switch perl-5.14.2
$ perl -MMusic::Tag -E 'Music::Tag->new(shift) and say "why are we here?"' foo.mp7
Music::Tag::Auto Sorry, I can't find a plugin for /home/tim/foo.mp7 at /home/tim/perl5/perlbrew/perls/perl-5.14.2/lib/site_perl/5.14.2/Music/Tag.pm line 165
Error loading plugin Music::Tag::Auto: Died at /home/tim/perl5/perlbrew/perls/perl-5.14.2/lib/site_perl/5.14.2/Music/Tag.pm line 165.
at -e line 1

The empty die caused the croak to be reached (no "why are we here?" line).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Feb 04, 2012
Tim Heaney We are not croaking when the plugin fails.
$ perl -MMusic::Tag -E 'Music::Tag->new(shift) and say "why are we here?"' foo.mp7
Music::Tag::Auto Sorry, I can't find a plugin for /home/tim/foo.mp7 at /home/tim/perl5/perlbrew/perls/perl-5.12.4/lib/site_perl/5.12.4/Music/Tag.pm line 146
why are we here?
0be6af6
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  lib/Music/Tag.pm
2  lib/Music/Tag.pm
@@ -146,7 +146,7 @@ sub add_plugin {
146 146
                         $plugin = 'Music::Tag::' . $plugin;
147 147
                     }
148 148
                     if ( $self->_has_module($plugin) ) {
149  
-                        $ref = $plugin->new( $self, $options );
  149
+                        $ref = $plugin->new( $self, $options ) or die;
150 150
                     }
151 151
                     return 1;
152 152
                 }
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.