1 with Perl 5.12.3 we changed $self->{"nametemplate_pem"} via $file modification
4 nametemplate_pem = @ALIAS@.r@R@.pem
5 infodir = /etc/pki/esteid
6 cadir = /etc/pki/esteid
7 output = /etc/pki/esteid/crl
11 VERBOSE(3) Writing PEM file /etc/pki/esteid/crl//etc/pki/esteid/crl/ESTEID-SK_2007.r0.pem
13 VERBOSE(3) Writing PEM file /etc/pki/esteid/crl/ESTEID-SK_2007.r0.pem
15 16:21:09 SamChi> glen: foreach does not copy the value, it assigns each value of the list to the variable
16 16:21:31 SamChi> glen: unless it is not a valid lvalue, then it may have to be copied
17 16:22:12 SamChi> $ perl -le '@a = qw(a b); foreach (@a) { $_ .= "foobar" }; print "@a"'
18 16:22:12 SamChi> afoobar bfoobar
19 16:22:55 SamChi> glen: oh, I was wrong about the second part
20 16:23:03 SamChi> $ perl -le '@a = qw(a b); foreach my $v (@a, "c") { $v .= "foobar" }; print "@a"'
21 16:23:03 SamChi> Modification of a read-only value attempted at -e line 1.
23 --- fetch-crl-3.0.6/fetch-crl 2011-03-20 05:01:20.000000000 +0200
24 +++ fetch-crl-3.0.6/fetch-crl 2011-06-11 11:30:58.731040625 +0300
25 @@ -1873,13 +1879,14 @@
26 $::cnf->{_}->{"output_der"}, $::cnf->{_}->{"output_pem"},
27 $::cnf->{_}->{"output_nss"}, $::cnf->{_}->{"output_openssl"}) ) {
28 defined $output and $output or next;
31 $self->{"nametemplate_der"},
32 $self->{"nametemplate_pem"},
33 $self->{"alias"}.".r\@R\@",
34 $self->{"anchorname"}.".r\@R\@",
38 + my $file = $ref; # copy, not to change original
39 $file =~ s/\@R\@/$i/g;
40 $file = join "/", $output, $file;