Thursday, October 9, 2008

last.fm-ripper: Undefined argument in option spec

I couldn't get last.fm-ripper to work, it kept giving the error "Undefined argument in option spec". I commented out a bunch of stuff then it worked again, watevar! Here are the random changes I made:

GetOptions(
#'help|?' => \$help,
# 'debug|d' => \$debug,
# 'no_covers|n' => $no_covers,
'artist|a=s' => \$artist,
'username|u=s' => \$username,
'password|p=s' => \$password,
'output_dir|o=s' => \$output_directory#,
#'aws_token|w=s' => \$aws_token
);




I don't know perl I don't want to know perl.

2 comments:

  1. thanks, thats awesome, such a little trick, but worked like a flying pig

    thanks again :)

    ReplyDelete
  2. the offending line is:

    'no_covers|n' => $no_covers,

    it should be:

    'no_covers|n' => \$no_covers,

    Have a read of Getopt::Long

    ReplyDelete