Windows プラットフォームに scmbug をインストールしようとしています。以下のメソッドで Hash を参照エラーとして取得しています。「HERE」注釈を参照して、それがどこで起こっているかを確認してください。
すべての %mail を $mail に置き換える必要がありますか?
これを試しましたが、他のエラーが発生しました。言って
グローバル シンボル "$mail" には明示的なパッケージ名が必要です
これを修正するには?
sub mail_notification_send_mail {
my $self = shift;
my ($request, $subject, $message, $mailing_list) = ( @_ );
my %mail;
# Set values. This permits users to override the default behavior
# of Mail::Sendmail
%mail = \%{ $request->{ policies }->{ mail_notification }->{ mail_settings } };
%mail->{ 'X-Mailer' } = "Mail::Sendmail version $Mail::Sendmail::VERSION"; HERE
%mail->{ Subject } = $subject; HERE
%mail->{ Message } = $message; HERE
#
# Since we just reset %mail to values, we haven't really picked up
# the To,From,Reply-To that were computed. We do this next
#
# Don't blindly ignore the To list that was computed
my $mailing_list_to = $self->emails_to_csv( $mailing_list->{ To } );
%mail->{ To } = $mailing_list_to; HERE
# Don't blindly ignore the From list that was computed
my $mailing_list_from = $self->emails_to_csv( $mailing_list->{ From } );
%mail->{ From } = $mailing_list_from; HERE
# Don't blindly ignore the 'Reply-To' list that was computed
my $mailing_list_replyto = $self->emails_to_csv( $mailing_list->{ 'Reply-To' } );
%mail->{ 'Reply-To' } = $mailing_list_replyto; HERE
if ( !sendmail(%mail) ) {
my $msg = "Sending mail on " . $request->{ name } .
" failed. Log error was:\n" . $Mail::Sendmail::error . "\n";
$request->add_result(1, $msg);
}
}
ありがとう