Re: Streamlined application/script development [Re: coding an Application in perl]
Jean-Louis Martineau <[email protected]> Wed, 30 Aug 2017 11:31:40 -0400
| Newsgroups | gmane.comp.archivers.amanda.devel |
|---|---|
| Message-ID | <[email protected]> |
I started to look at the command_support.
Why $say_supports is a variable instead of a sub?
In $say_supports, why to you blessed($self)? Why not just use $self?
Something like:
sub supports {
my ($self, $supname ) = @_;
my $s = $self->can("supports_".$supname);
return (defined $s) and $s;
}
sub say_supports {
my ( $self, $confstring, $supname ) = @_;
my $yn = $self->supports($supname) ? "YES" : "NO";
print $confstring . " " . $yn . "\n";
}
jean-Louis
On 12/08/17 12:59 PM, Chapman Flack wrote:
> On 06/05/17 17:03, Chapman Flack wrote:
> > On 06/02/2017 02:07 PM, Chapman Flack wrote:
> >
> >> I am nearly at the point of pushing this stuff to a github fork
> >> for possible eventual consideration. It has been running for me
> >> in actual backups for the better part of a year (down to a month
> >> or two for the newest scripts), so there is experience behind it.
>
> https://github.com/zmanda/amanda/pull/78
> <https://github.com/zmanda/amanda/pull/78>
>
> I think this could significantly simplify development of new
> Amanda applications and scripts, enough that more 'ordinary' Amanda
> users (who are not -hackers) could approach creating and sharing them
> for special backup circumstances they face. I hope, with more people
> able to contribute and a less steep learning curve, it can lead to more
> progress on the list of proposed applications on the developer Tasks
> wiki page!
>
> Cheers,
> -Chap
This message is the property of CARBONITE, INC. and may contain confidential or privileged information.
If this message has been delivered to you by mistake, then do not copy or deliver this message to anyone. Instead, destroy it and notify me by reply e-mail