好的,这就是主文件使用那些包含 pm 文件的方式
use Dancer;
use Net::OAuth2::Client;
use HTTP::Request::Common;
sub client {
Net::OAuth2::Client->new(
'0', # OAuth 2.0 client_id
'1234567890abcdef', # OAuth 2.0 client_secret
site => 'http://www.deviantart.com',
authorize_path => 'https://www.deviantart.com/oauth2/draft15/authorize?response_type=code',
access_token_path => 'https://www.deviantart.com/oauth2/draft15/token?grant_type=authorization_code',
access_token_method => 'GET',
)->web_server(
redirect_uri => uri_for('/auth/deviantart/callback')
);
}
我已将这些 PM 文件放在与此相同的目录中,但由于无法找到而失败
这些文件是这样开始的
package Net::OAuth2::Client;
package HTTP::Request::Common;
package Dancer;