The --local-lib option needs to take a parameter, just like you are doing in your second example: -L extlib
You probably want -l ~/p5libs
or something of that nature, depending on where you want your libraries installed. The default directory that local::lib uses is ~/perl5, so it's not a bad idea to use that. :)