Make the cake:
Preheat the oven to 350ºF. Grease and flour a 9x13-inch cake pan.
In a large bowl, combine the grated carrots, flour, sugar, baking soda, salt and cinnamon. Add the eggs, oil, vanilla extract, crushed pineapple and chopped pecans, stirring until combined.
Transfer the batter to the prepared cake pan and bake for 35 to 40 minutes until a toothpick inserted comes out clean.
Transfer the cake, still in the pan, to a cooling rack to cool completely then invert it onto a large cutting board.
Make the frosting:
In the bowl of a stand mixer fitted with the paddle attachment, beat the cream cheese until smooth, scraping down the sides as needed. Add the butter and vanilla extract, beating until combined.
Stop the stand mixer, sift the confectioners' sugar into the bowl and then beat just until combined.
Decorate the cake:
Line a large baking sheet with wax paper. Melt the green candy melts in the microwave or on the stove per the package instructions then transfer it to a piping bag fitted with a small round tip. Pipe carrot stems onto the wax paper by piping a long line with leaves on the end. (See Notes.) Set the carrot stems aside to cool until they have fully hardened.
Once the cake has cooled completely, frost it with the cream cheese frosting then slice it into carrot-shaped pieces. (See Notes.)
Melt the orange candy melts in the microwave or on the stove per the package instructions then transfer it to a piping bag fitted with a small round tip. Pipe the orange candy coating across the top of the cake slices in your preferred pattern.
then carefully insert about three of the hardened candy carrot stems into the back side of each slice of cake. (See Notes.) Serve immediately.
Cutting the 9x13-inch cake into carrot-shaped slices requires discarding (and/or eating) a small portion of the cake. If you'd rather feed more people and not have to discard any excess cake, simply cut the cake into squares and decorate as instructed.
I used an Ateco #3 small round pastry tip to pipe both the green carrot stems and the orange decoration on top of the cake slices.
The candy carrot stems break very easily when inserting them into the cake, so I recommend piping as many extra carrot stems as possible to allow for any breakage. You can also pipe a thicker carrot stem, which would make a sturdier candy piece to press into each slice of cake.