oo(3) User Contributed Perl Documentation oo(3)

# [NAME](#NAME)

oo - syntactic sugar for Moo oneliners

# [SYNOPSIS](#SYNOPSIS)

```
  perl -Moo=Foo -e 'has bar => ( is => q[ro], default => q[baz] ); print Foo->new->bar'
  # loads an existing class and re-"opens" the package definition
  perl -Moo=+My::Class -e 'print __PACKAGE__->new->bar'
```

# [DESCRIPTION](#DESCRIPTION)

oo.pm is a simple source filter that adds "package $name; use Moo;" to the beginning of your script, intended for use on the command line via the -M option.

# [SUPPORT](#SUPPORT)

See Moo for support and contact information.

# [AUTHORS](#AUTHORS)

See Moo for authors.

# [COPYRIGHT AND LICENSE](#COPYRIGHT_AND_LICENSE)

See Moo for the copyright and license.

2026-10-24 perl v5.44.0

---

Document: oo(3pm) from perl-moo 2.005005-r2 (Chainguard OS)
Source: https://github.com/moose/Moo
