Thread Fehler bei File::Util::atomize_path unter Ubuntu (18 answers)
Opened by payx at 2013-04-12 21:42

Linuxer
 2013-04-12 23:28
#167036 #167036
User since
2006-01-27
3881 Artikel
HausmeisterIn

user image
pq hatte es im IRC schon erwähnt, ich habe es gerade bei meiner AutoLoader.pm (Version 5.73) nachgelesen:

Der Dateiname wird bei der Fehlermeldung stumpf immer(!) abgeschnitten (siehe Zeile 21 im folgenden Code):

Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#...
sub autoload_sub {
    my $sub = shift;

    my $filename = AutoLoader::find_filename( $sub );

    my $save = $@;
    local $!; # Do not munge the value. 
    eval { local $SIG{__DIE__}; require $filename };
    if ($@) {
        if (substr($sub,-9) eq '::DESTROY') {
            no strict 'refs';
            *$sub = sub {};
            $@ = undef;
        } elsif ($@ =~ /^Can't locate/) {
            # The load might just have failed because the filename was too
            # long for some old SVR3 systems which treat long names as errors.
            # If we can successfully truncate a long name then it's worth a go.
            # There is a slight risk that we could pick up the wrong file here
            # but autosplit should have warned about that when splitting.
            if ($filename =~ s/(\w{12,})\.al$/substr($1,0,11).".al"/e){
                eval { local $SIG{__DIE__}; require $filename };
            }
        }
#...

(#... von mir)
meine Beiträge: I.d.R. alle Angaben ohne Gewähr und auf Linux abgestimmt!
Die Sprache heisst Perl, nicht PERL. - Bitte Crossposts als solche kenntlich machen!

View full thread Fehler bei File::Util::atomize_path unter Ubuntu