[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]

Re: Devel::DProf patch to allow setting output file



Gurusamy Sarathy writes:
> @@ -663,10 +665,14 @@
>  	    else {
>  		g_dprof_ticks = HZ;
>  	    }
> +
> +	    buffer = getenv("PERL_DPROF_OUT_FILE_NAME");
> +	    g_out_file_name = savepv(buffer ? buffer : "tmon.out");
>  	}
>  
> -        if ((g_fp = PerlIO_open("tmon.out", "w")) == NULL)
> -	    croak("DProf: unable to write tmon.out, errno = %d\n", errno);
> +        if ((g_fp = PerlIO_open(g_out_file_name, "w")) == NULL)
> +	    croak("DProf: unable to write '%s', errno = %d\n",
> +		  g_out_file_name, errno);

Why savepv?

Ilya


Follow-Ups from:
Gurusamy Sarathy <gsar@ActiveState.com>
References to:
Gurusamy Sarathy <gsar@ActiveState.com>

[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]