# Creation of a COMPUTE data source is not contemplated in the # documentation, nor it is in the code. That's why we use an # object in dry-run mode: we'll get a reference to the function # and arguments that were about to be called, and add our # resource. Finally, we run the call. # Pretty bad it didn't have the function already... my $dsdef = q{DS:aggregate:COMPUTE:}. join(",",@dsources).",ADDNAN"x$#dsources ; $rrdbuilder->create(@rrd_parms) ; # Get references to the RRD function and arguments # Push the COMPUTE data source in it # Run the create command, see what happens my ($subref,$args) = $rrdbuilder->get_exec_env(); push @$args,$dsdef ; eval { $subref->(@$args) ; } ;