~ubuntu-branches/ubuntu/vivid/libapp-cmd-perl/vivid

« back to all changes in this revision

Viewing changes to t/lib/Test/MyCmd/Command/hello.pm

  • Committer: Package Import Robot
  • Author(s): gregor herrmann
  • Date: 2012-02-11 20:22:46 UTC
  • mfrom: (1.2.11)
  • Revision ID: package-import@ubuntu.com-20120211202246-0422h4flypekda8n
Tags: 0.316-1
* New upstream release.
* Add libio-tiecombine-perl to Depends.
* Add /me to Uploaders.

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
sub execute {
11
11
  my ($self, $opt, $arg) =@_;
12
12
 
13
 
  my $echo = can_run("echo");
14
 
  $self->usage_error("Program 'echo' not found") unless $echo;
15
 
  system($echo, "Hello World");
 
13
  if ( $^O eq 'MSWin32' ) {
 
14
    system('cmd', '/c', 'echo', "Hello World");
 
15
  }
 
16
  else {
 
17
    my $echo = can_run("echo");
 
18
    $self->usage_error("Program 'echo' not found") unless $echo;
 
19
    system($echo, "Hello World");
 
20
  }
16
21
  return;
17
22
}
18
23