1 # Copyright (c) 2010, 2011 Zmanda, Inc. All Rights Reserved.
3 # This program is free software; you can redistribute it and/or modify it
4 # under the terms of the GNU General Public License version 2 as published
5 # by the Free Software Foundation.
7 # This program is distributed in the hope that it will be useful, but
8 # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
9 # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 # You should have received a copy of the GNU General Public License along
13 # with this program; if not, write to the Free Software Foundation, Inc.,
14 # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 # Contact information: Zmanda Inc., 465 S. Mathilda Ave., Suite 300
17 # Sunnyvale, CA 94085, USA, or: http://www.zmanda.com
19 package Amanda::Interactivity::tty_email;
23 use POSIX qw( :errno_h );
25 @ISA = qw( Amanda::Interactivity );
29 use Amanda::Debug qw( debug );
31 use Amanda::MainLoop qw( :GIOCondition );
32 use Amanda::Interactivity::tty;
33 use Amanda::Interactivity::email;
37 Amanda::Interactivity::tty_email -- Interactivity class to read user request from /dev/tty
41 Amanda::Interactivity class combining tty (when it is available) and email (otherwise).
51 my $r = open($input, '>', "/dev/tty");
54 return Amanda::Interactivity::tty->new($property);
56 return Amanda::Interactivity::email->new($property);